SDK: use Skyvern.local() factory method (#4206)
This commit is contained in:
committed by
GitHub
parent
32fb2315f0
commit
e1693b2fef
@@ -50,7 +50,7 @@ You can also run browser tasks locally with Python code, with a little bit of se
|
||||
from skyvern import Skyvern
|
||||
import asyncio
|
||||
|
||||
skyvern = Skyvern()
|
||||
skyvern = Skyvern(api_key="YOUR_LOCAL_API_KEY")
|
||||
|
||||
asyncio.run(skyvern.run_task(prompt="Find the top post on hackernews today"))
|
||||
```
|
||||
|
||||
@@ -37,7 +37,7 @@ Laminar.initialize(disabled_instruments=set([Instruments.OPENAI]))
|
||||
# Configure LiteLLM to trace all LLM calls made by Skyvern
|
||||
litellm.callbacks = [LaminarLiteLLMCallback()]
|
||||
|
||||
skyvern = Skyvern()
|
||||
skyvern = Skyvern(api_key="YOUR_API_KEY")
|
||||
|
||||
async def main():
|
||||
task = await skyvern.run_task(
|
||||
|
||||
@@ -131,7 +131,7 @@ For example, if you want to get the title, URL, and points of the top post on Ha
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern()
|
||||
skyvern = Skyvern(api_key="YOUR_API_KEY")
|
||||
task = await skyvern.run_task(
|
||||
prompt="Find the top post on hackernews today",
|
||||
data_extraction_schema={
|
||||
@@ -159,7 +159,7 @@ When you are sending a run task request the Skyvern service, you can set the `wa
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern()
|
||||
skyvern = Skyvern(api_key="YOUR_API_KEY")
|
||||
task = await skyvern.run_task(
|
||||
prompt="Find the top post on hackernews today",
|
||||
# the request will be hanging until the task is done
|
||||
@@ -173,7 +173,7 @@ Instead of waiting, you can also set the `webhook_url` in the run task request a
|
||||
```python
|
||||
from skyvern import Skyvern
|
||||
|
||||
skyvern = Skyvern()
|
||||
skyvern = Skyvern(api_key="YOUR_API_KEY")
|
||||
task = await skyvern.run_task(
|
||||
prompt="Find the top post on hackernews today",
|
||||
webhook_url="https://your-webhook-url.com",
|
||||
|
||||
Reference in New Issue
Block a user