Skip to content

Commit

Permalink
docs: update double texting how-tos (#2431)
Browse files Browse the repository at this point in the history
  • Loading branch information
vbarda authored Nov 15, 2024
1 parent 81077e7 commit 0388534
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/docs/cloud/how-tos/interrupt_concurrent.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ Now we can start our two runs and join the second on euntil it has completed:
assistant_id,
input={"messages": [{"role": "user", "content": "what's the weather in sf?"}]},
)
# sleep a bit to get partial outputs from the first run
await asyncio.sleep(2)
run = await client.runs.create(
thread["thread_id"],
Expand All @@ -114,6 +115,7 @@ Now we can start our two runs and join the second on euntil it has completed:
assistantId,
{ input: { messages: [{ role: "human", content: "what's the weather in sf?" }] } }
);
// sleep a bit to get partial outputs from the first run
await new Promise(resolve => setTimeout(resolve, 2000));

let run = await client.runs.create(
Expand Down
4 changes: 1 addition & 3 deletions docs/docs/cloud/how-tos/rollback_concurrent.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ Now let's run a thread with the multitask parameter set to "rollback":
assistant_id,
input={"messages": [{"role": "user", "content": "what's the weather in sf?"}]},
)
await asyncio.sleep(2)
run = await client.runs.create(
thread["thread_id"],
assistant_id,
Expand All @@ -115,7 +114,6 @@ Now let's run a thread with the multitask parameter set to "rollback":
assistantId,
{ input: { messages: [{ role: "human", content: "what's the weather in sf?" }] } }
);
await new Promise(resolve => setTimeout(resolve, 2000));

let run = await client.runs.create(
thread["thread_id"],
Expand All @@ -139,7 +137,7 @@ Now let's run a thread with the multitask parameter set to "rollback":
--data "{
\"assistant_id\": \"agent\",
\"input\": {\"messages\": [{\"role\": \"human\", \"content\": \"what\'s the weather in sf?\"}]},
}" && sleep 2 && curl --request POST \
}" && curl --request POST \
--url <DEPLOY<ENT_URL>>/threads/<THREAD_ID>/runs \
--header 'Content-Type: application/json' \
--data "{
Expand Down

0 comments on commit 0388534

Please sign in to comment.