Skip to content

Diberry/0527 update agents quickstart #1230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Original",
"request": "launch",
"runtimeArgs": [
"run-script",
"start:js"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"cwd": "${workspaceFolder}/quickstarts/ai-agents/ts",
"type": "node"
},
{
"name": "Code interp",
"request": "launch",
"runtimeArgs": [
"run-script",
"start:js"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"cwd": "${workspaceFolder}/quickstarts/ai-agents/ts",
"type": "node"
},
{
"name": "Launch TS",
"request": "launch",
"runtimeArgs": [
"run-script",
"start"
],
"runtimeExecutable": "npm",
"skipFiles": [
"<node_internals>/**"
],
"cwd": "${workspaceFolder}/quickstarts/ai-agents/ts",
"type": "node"
}
]
}
44 changes: 44 additions & 0 deletions agent-message-2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"data": {
"id": "run_h1AAJ25FuI0sXKEpqfKwJC6K",
"object": "thread.run",
"created_at": 1749046155,
"assistant_id": "asst_VHRy7r1EEu11x4jbkNlD9BZ6",
"thread_id": "thread_oLHxCoMn8WG6JwYWC6NkEkWt",
"status": "queued",
"started_at": null,
"expires_at": 1749046755,
"cancelled_at": null,
"failed_at": null,
"completed_at": null,
"required_action": null,
"last_error": null,
"model": "gpt-4o",
"instructions": "You are a helpful agent",
"tools": [
{
"type": "code_interpreter"
}
],
"tool_resources": {
"code_interpreter": {
"file_ids": []
}
},
"metadata": {},
"temperature": 1,
"top_p": 1,
"max_completion_tokens": null,
"max_prompt_tokens": null,
"truncation_strategy": {
"type": "auto",
"last_messages": null
},
"incomplete_details": null,
"usage": null,
"response_format": "auto",
"tool_choice": "auto",
"parallel_tool_calls": true
},
"event": "thread.run.queued"
}
35 changes: 35 additions & 0 deletions agent-message-rate-limit-error.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"data": {
"id": "step_3jvJW2ljvo9BiGrjI7dWLnTD",
"object": "thread.run.step",
"created_at": 1749049871,
"run_id": "run_2JDnauXAoaz9zUO3po6dDQVo",
"assistant_id": "asst_T7EVn6EY9SffNjBSWfPquRCl",
"thread_id": "thread_m9EbMt50BauuWS1U73onUcEa",
"type": "message_creation",
"status": "failed",
"cancelled_at": null,
"completed_at": null,
"expires_at": 1749050464,
"failed_at": 1749049876,
"last_error": {
"code": "rate_limit_exceeded",
"message": "Rate limit is exceeded. Try again in 50 seconds."
},
"step_details": {
"type": "message_creation",
"message_creation": {
"message_id": "msg_GbuHVL7n2sK2ynWy6pcovMP8"
}
},
"usage": {
"prompt_tokens": 1490,
"completion_tokens": 37,
"total_tokens": 1527,
"prompt_token_details": {
"cached_tokens": 0
}
}
},
"event": "thread.run.step.failed"
}
27 changes: 27 additions & 0 deletions agent-message.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{
"data": {
"id": "msg_h52NoePFcWOOjIm4iKqdlh1O",
"object": "thread.message",
"created_at": 1749046163,
"assistant_id": "asst_VHRy7r1EEu11x4jbkNlD9BZ6",
"thread_id": "thread_oLHxCoMn8WG6JwYWC6NkEkWt",
"run_id": "run_h1AAJ25FuI0sXKEpqfKwJC6K",
"status": "completed",
"incomplete_details": null,
"incomplete_at": null,
"completed_at": 1749046164,
"role": "assistant",
"content": [
{
"type": "text",
"text": {
"value": "The data has been filtered for companies in the transportation industry. Four companies were found:\n\n1. Consolidated Messenger: Operating profit = 290.7\n2. Northwind Traders: Operating profit = 9166.0\n3. Tailwind Traders: Operating profit = 164.9\n4. Wide World Importers: Operating profit = 473.6\n\nNow, I'll proceed to generate the bar chart illustrating this data.",
"annotations": []
}
}
],
"attachments": [],
"metadata": {}
},
"event": "thread.message.completed"
}
Loading
Loading