mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-16 10:19:42 +00:00
update documentation part3 - add code examples (#2369)
This commit is contained in:
parent
89fd604022
commit
d2419d82d7
4 changed files with 922 additions and 353 deletions
18
skyvern/forge/sdk/routes/code_samples.py
Normal file
18
skyvern/forge/sdk/routes/code_samples.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
RUN_TASK_CODE_SAMPLE = """from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(api_key="your_api_key")
|
||||
await client.run_task(prompt="What's the top post on hackernews?")
|
||||
"""
|
||||
|
||||
GET_RUN_CODE_SAMPLE = """from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(api_key="your_api_key")
|
||||
run = await client.get_run(run_id="tsk_123")
|
||||
print(run)
|
||||
"""
|
||||
|
||||
RUN_WORKFLOW_CODE_SAMPLE = """from skyvern import Skyvern
|
||||
|
||||
client = Skyvern(api_key="your_api_key")
|
||||
await client.agent.run_workflow(workflow_id="wpid_123", parameters={"parameter1": "value1", "parameter2": "value2"})
|
||||
"""
|
Loading…
Add table
Add a link
Reference in a new issue