From d0f2f2b2cc04d15046e45d050dd4ec9a58f15b24 Mon Sep 17 00:00:00 2001 From: marko-kraemer Date: Mon, 11 Nov 2024 18:32:26 +0100 Subject: [PATCH] stream thread run responses with tool calls --- agentpress/cli.py | 8 +- .../{example-agent => example_agent}/agent.py | 0 .../tools/files_tool.py | 3 - .../tools/terminal_tool.py | 0 agentpress/llm.py | 36 ++- agentpress/thread_manager.py | 280 +++++++++++++----- poetry.lock | 79 ++++- pyproject.toml | 2 + state.json | 22 ++ .../0019ba22-c77c-450c-89c3-61444d157a20.json | 1 + .../01ef5082-7ebe-43be-9caa-ef66ff81968a.json | 1 + .../03eb66b2-bed2-4422-ac6f-66ab8af370f2.json | 1 + .../04060f77-758f-4125-93f3-95c3a3058ea0.json | 1 + .../0931a64f-88c7-4bd9-aa9d-5af76aa04428.json | 1 + .../10e39766-8977-4d55-9234-c304e35d6a23.json | 1 + .../1185012f-c411-4791-8968-d142f1f38006.json | 1 + .../1231438c-439e-4cff-ac93-11ef39c5d33a.json | 1 + .../126c8950-c813-4bb9-853e-d5503fd91a06.json | 1 + .../157bf707-f72c-4588-9d02-f5841fa42d61.json | 1 + .../1fed381a-53e0-4bde-9233-b613127af1ca.json | 1 + .../248de190-aeeb-4327-b76b-89226faf8212.json | 1 + .../31ad882c-4b82-46bc-ad8d-ec4f90511c7c.json | 1 + .../31e95197-2372-48e2-9def-078ea8d2a004.json | 1 + .../3eb036bb-616c-40d2-abe2-a1fffd3b2108.json | 1 + .../3f1f1028-a61d-4272-a03c-0f2b4774857e.json | 1 + .../45197f69-5885-416c-bced-fb0f2fee319f.json | 1 + .../4d5a9d1c-69b4-4fd3-8208-b5723743388a.json | 1 + .../513c30a8-2ff3-4dc1-9ef8-808f1c5bde48.json | 1 + .../524f9cff-357c-461d-b166-899877936988.json | 1 + .../525bb7a6-5da5-4907-8a64-ead9b4f97123.json | 1 + .../54965ca3-b6fd-4f21-8b3f-6a4b82ba201e.json | 1 + .../59183ab0-0348-4c73-a044-c2cac3c31d97.json | 1 + .../5d732243-ce5d-4a26-b81f-30af9305817f.json | 1 + .../5e9c6a0c-d0a0-43c5-bc07-33f24b1da387.json | 1 + .../5f21ca3c-5125-4a8d-b50e-0a458527c0bf.json | 1 + .../63fdbd0f-62ed-40ab-95f5-7688e717051f.json | 1 + .../64cad164-5c78-4469-8ea1-f1d0d005c851.json | 1 + .../67235edb-73a5-42d3-a7fb-ef054c02b94b.json | 1 + .../6c2c5dae-6e4c-4ce5-a20d-3cea2a2d8ab8.json | 1 + .../6ed86014-a9ff-4052-987e-940a4535ec79.json | 1 + .../6efd4fa8-8b55-4e46-aa76-04ec32bfa458.json | 1 + .../74683acc-297c-4f14-87c8-b63a65e4a7e3.json | 1 + .../7ed7e929-04fc-47da-a1ae-4676da10e74b.json | 1 + .../7fb7c4f1-e7e6-4cf4-ad46-90a41632b5d3.json | 1 + .../81808950-dcf7-4ead-9405-e6e2692afb90.json | 1 + .../84b300dd-0ca3-4a2a-87ae-7f119b05ffd9.json | 1 + .../8d701873-2d2d-44c4-b73b-16ee03ef468b.json | 1 + .../8f36ca63-ddbd-4f51-a565-df65dde85014.json | 1 + .../8f94e598-954c-4799-b7c9-1d065799767e.json | 1 + .../9a9127fe-0368-4982-9ccf-7974f5b4720e.json | 1 + .../9d28eade-d355-45f3-86e4-991af95d9e0b.json | 1 + .../9fc0768b-7390-4d34-9516-e77716ee8625.json | 1 + .../a33c9e7c-e820-4873-bbe7-c83b193bb98e.json | 1 + .../a9f853fc-25e9-4efb-a643-72a54effb9a8.json | 1 + .../ac374aa0-204e-414c-a05e-f7bb877b6c0a.json | 1 + .../b0593441-9ddd-4061-8634-d2a47e51b87e.json | 1 + .../b061f328-0b8c-4bd2-85ed-c2ba5d5ddf1d.json | 1 + .../b1090883-83f8-4e66-962f-f2e6e958e0ac.json | 1 + .../b2198c9b-1a98-4c57-8094-277d0490c353.json | 1 + .../b4eb1fac-d53f-4e4b-9207-616d9f81b0e7.json | 1 + .../b574f5f4-45ab-450c-8f38-4a6c069db9d5.json | 1 + .../b68b1531-2044-40dd-ba9b-6bfea2786a8d.json | 1 + .../b7771038-0bd0-487e-88b4-0587202bd52e.json | 1 + .../c8063eb2-5694-4af2-bb1e-6ee49d62f2a6.json | 1 + .../c8928719-1263-4cf7-bc8d-c7b30819a4f6.json | 1 + .../cabee3ec-a870-4b84-94c6-4cb5e7bdcf7d.json | 1 + .../d349f505-3ba2-4c85-96f1-307794ce515b.json | 1 + .../d7a0fb2a-5f2b-45ce-a1ca-9bdb3eb81301.json | 1 + .../d9c90de9-4104-4082-87c1-ff6b4a40c0c5.json | 1 + .../de5e09c3-cc03-4209-a53b-f032a6412412.json | 1 + .../df28355f-6afa-4e7e-b6c4-dbcc0bf49a39.json | 1 + .../e7822f39-51a7-49c0-bd11-ea8a6c8068bc.json | 1 + .../f28c12d7-9ea6-4e56-96ad-8c030cd8f1be.json | 1 + .../f470fdf9-f7bd-43e7-a007-7a26a4dff689.json | 1 + .../f7113782-3233-4551-80cb-e39cff401b0b.json | 1 + .../f8fc3861-eedf-457f-a2ec-a0693c247b8b.json | 1 + .../fab29336-dc19-433e-af99-04c632cb5709.json | 1 + 77 files changed, 402 insertions(+), 96 deletions(-) rename agentpress/examples/{example-agent => example_agent}/agent.py (100%) rename agentpress/examples/{example-agent => example_agent}/tools/files_tool.py (98%) rename agentpress/examples/{example-agent => example_agent}/tools/terminal_tool.py (100%) create mode 100644 state.json create mode 100644 threads/0019ba22-c77c-450c-89c3-61444d157a20.json create mode 100644 threads/01ef5082-7ebe-43be-9caa-ef66ff81968a.json create mode 100644 threads/03eb66b2-bed2-4422-ac6f-66ab8af370f2.json create mode 100644 threads/04060f77-758f-4125-93f3-95c3a3058ea0.json create mode 100644 threads/0931a64f-88c7-4bd9-aa9d-5af76aa04428.json create mode 100644 threads/10e39766-8977-4d55-9234-c304e35d6a23.json create mode 100644 threads/1185012f-c411-4791-8968-d142f1f38006.json create mode 100644 threads/1231438c-439e-4cff-ac93-11ef39c5d33a.json create mode 100644 threads/126c8950-c813-4bb9-853e-d5503fd91a06.json create mode 100644 threads/157bf707-f72c-4588-9d02-f5841fa42d61.json create mode 100644 threads/1fed381a-53e0-4bde-9233-b613127af1ca.json create mode 100644 threads/248de190-aeeb-4327-b76b-89226faf8212.json create mode 100644 threads/31ad882c-4b82-46bc-ad8d-ec4f90511c7c.json create mode 100644 threads/31e95197-2372-48e2-9def-078ea8d2a004.json create mode 100644 threads/3eb036bb-616c-40d2-abe2-a1fffd3b2108.json create mode 100644 threads/3f1f1028-a61d-4272-a03c-0f2b4774857e.json create mode 100644 threads/45197f69-5885-416c-bced-fb0f2fee319f.json create mode 100644 threads/4d5a9d1c-69b4-4fd3-8208-b5723743388a.json create mode 100644 threads/513c30a8-2ff3-4dc1-9ef8-808f1c5bde48.json create mode 100644 threads/524f9cff-357c-461d-b166-899877936988.json create mode 100644 threads/525bb7a6-5da5-4907-8a64-ead9b4f97123.json create mode 100644 threads/54965ca3-b6fd-4f21-8b3f-6a4b82ba201e.json create mode 100644 threads/59183ab0-0348-4c73-a044-c2cac3c31d97.json create mode 100644 threads/5d732243-ce5d-4a26-b81f-30af9305817f.json create mode 100644 threads/5e9c6a0c-d0a0-43c5-bc07-33f24b1da387.json create mode 100644 threads/5f21ca3c-5125-4a8d-b50e-0a458527c0bf.json create mode 100644 threads/63fdbd0f-62ed-40ab-95f5-7688e717051f.json create mode 100644 threads/64cad164-5c78-4469-8ea1-f1d0d005c851.json create mode 100644 threads/67235edb-73a5-42d3-a7fb-ef054c02b94b.json create mode 100644 threads/6c2c5dae-6e4c-4ce5-a20d-3cea2a2d8ab8.json create mode 100644 threads/6ed86014-a9ff-4052-987e-940a4535ec79.json create mode 100644 threads/6efd4fa8-8b55-4e46-aa76-04ec32bfa458.json create mode 100644 threads/74683acc-297c-4f14-87c8-b63a65e4a7e3.json create mode 100644 threads/7ed7e929-04fc-47da-a1ae-4676da10e74b.json create mode 100644 threads/7fb7c4f1-e7e6-4cf4-ad46-90a41632b5d3.json create mode 100644 threads/81808950-dcf7-4ead-9405-e6e2692afb90.json create mode 100644 threads/84b300dd-0ca3-4a2a-87ae-7f119b05ffd9.json create mode 100644 threads/8d701873-2d2d-44c4-b73b-16ee03ef468b.json create mode 100644 threads/8f36ca63-ddbd-4f51-a565-df65dde85014.json create mode 100644 threads/8f94e598-954c-4799-b7c9-1d065799767e.json create mode 100644 threads/9a9127fe-0368-4982-9ccf-7974f5b4720e.json create mode 100644 threads/9d28eade-d355-45f3-86e4-991af95d9e0b.json create mode 100644 threads/9fc0768b-7390-4d34-9516-e77716ee8625.json create mode 100644 threads/a33c9e7c-e820-4873-bbe7-c83b193bb98e.json create mode 100644 threads/a9f853fc-25e9-4efb-a643-72a54effb9a8.json create mode 100644 threads/ac374aa0-204e-414c-a05e-f7bb877b6c0a.json create mode 100644 threads/b0593441-9ddd-4061-8634-d2a47e51b87e.json create mode 100644 threads/b061f328-0b8c-4bd2-85ed-c2ba5d5ddf1d.json create mode 100644 threads/b1090883-83f8-4e66-962f-f2e6e958e0ac.json create mode 100644 threads/b2198c9b-1a98-4c57-8094-277d0490c353.json create mode 100644 threads/b4eb1fac-d53f-4e4b-9207-616d9f81b0e7.json create mode 100644 threads/b574f5f4-45ab-450c-8f38-4a6c069db9d5.json create mode 100644 threads/b68b1531-2044-40dd-ba9b-6bfea2786a8d.json create mode 100644 threads/b7771038-0bd0-487e-88b4-0587202bd52e.json create mode 100644 threads/c8063eb2-5694-4af2-bb1e-6ee49d62f2a6.json create mode 100644 threads/c8928719-1263-4cf7-bc8d-c7b30819a4f6.json create mode 100644 threads/cabee3ec-a870-4b84-94c6-4cb5e7bdcf7d.json create mode 100644 threads/d349f505-3ba2-4c85-96f1-307794ce515b.json create mode 100644 threads/d7a0fb2a-5f2b-45ce-a1ca-9bdb3eb81301.json create mode 100644 threads/d9c90de9-4104-4082-87c1-ff6b4a40c0c5.json create mode 100644 threads/de5e09c3-cc03-4209-a53b-f032a6412412.json create mode 100644 threads/df28355f-6afa-4e7e-b6c4-dbcc0bf49a39.json create mode 100644 threads/e7822f39-51a7-49c0-bd11-ea8a6c8068bc.json create mode 100644 threads/f28c12d7-9ea6-4e56-96ad-8c030cd8f1be.json create mode 100644 threads/f470fdf9-f7bd-43e7-a007-7a26a4dff689.json create mode 100644 threads/f7113782-3233-4551-80cb-e39cff401b0b.json create mode 100644 threads/f8fc3861-eedf-457f-a2ec-a0693c247b8b.json create mode 100644 threads/fab29336-dc19-433e-af99-04c632cb5709.json diff --git a/agentpress/cli.py b/agentpress/cli.py index ac252dee..24c6e797 100644 --- a/agentpress/cli.py +++ b/agentpress/cli.py @@ -36,12 +36,12 @@ MODULES = { } STARTER_EXAMPLES = { - "example-agent": { + "example_agent": { "description": "Web development agent with file and terminal tools", "files": { - "agent.py": "examples/example-agent/agent.py", - "tools/files_tool.py": "examples/example-agent/tools/files_tool.py", - "tools/terminal_tool.py": "examples/example-agent/tools/terminal_tool.py", + "agent.py": "examples/example_agent/agent.py", + "tools/files_tool.py": "examples/example_agent/tools/files_tool.py", + "tools/terminal_tool.py": "examples/example_agent/tools/terminal_tool.py", } } } diff --git a/agentpress/examples/example-agent/agent.py b/agentpress/examples/example_agent/agent.py similarity index 100% rename from agentpress/examples/example-agent/agent.py rename to agentpress/examples/example_agent/agent.py diff --git a/agentpress/examples/example-agent/tools/files_tool.py b/agentpress/examples/example_agent/tools/files_tool.py similarity index 98% rename from agentpress/examples/example-agent/tools/files_tool.py rename to agentpress/examples/example_agent/tools/files_tool.py index 2bffd657..a2c3fc22 100644 --- a/agentpress/examples/example-agent/tools/files_tool.py +++ b/agentpress/examples/example_agent/tools/files_tool.py @@ -1,9 +1,6 @@ import os import asyncio -from datetime import datetime from pathlib import Path -from collections import defaultdict -from typing import Optional, List from agentpress.tool import Tool, ToolResult, tool_schema from agentpress.state_manager import StateManager diff --git a/agentpress/examples/example-agent/tools/terminal_tool.py b/agentpress/examples/example_agent/tools/terminal_tool.py similarity index 100% rename from agentpress/examples/example-agent/tools/terminal_tool.py rename to agentpress/examples/example_agent/tools/terminal_tool.py diff --git a/agentpress/llm.py b/agentpress/llm.py index e8c35904..c8a79f35 100644 --- a/agentpress/llm.py +++ b/agentpress/llm.py @@ -20,10 +20,6 @@ os.environ['GROQ_API_KEY'] = GROQ_API_KEY # agentops.init(AGENTOPS_API_KEY) # os.environ['LITELLM_LOG'] = 'DEBUG' -# Setup logging -logging.basicConfig(level=logging.INFO) -logger = logging.getLogger(__name__) - async def make_llm_api_call(messages, model_name, response_format=None, temperature=0, max_tokens=None, tools=None, tool_choice="auto", api_key=None, api_base=None, agentops_session=None, stream=False, top_p=None): litellm.set_verbose = True @@ -32,13 +28,13 @@ async def make_llm_api_call(messages, model_name, response_format=None, temperat try: return await api_call_func() except litellm.exceptions.RateLimitError as e: - logger.warning(f"Rate limit exceeded. Waiting for 30 seconds before retrying...") + logging.warning(f"Rate limit exceeded. Waiting for 30 seconds before retrying...") await asyncio.sleep(30) except OpenAIError as e: - logger.info(f"API call failed, retrying attempt {attempt + 1}. Error: {e}") + logging.info(f"API call failed, retrying attempt {attempt + 1}. Error: {e}") await asyncio.sleep(5) except json.JSONDecodeError: - logger.error(f"JSON decoding failed, retrying attempt {attempt + 1}") + logging.error(f"JSON decoding failed, retrying attempt {attempt + 1}") await asyncio.sleep(5) raise Exception("Failed to make API call after multiple attempts.") @@ -77,7 +73,7 @@ async def make_llm_api_call(messages, model_name, response_format=None, temperat } # Log the API request - logger.info(f"Sending API request: {json.dumps(api_call_params, indent=2)}") + # logging.info(f"Sending API request: {json.dumps(api_call_params, indent=2)}") if agentops_session: response = await agentops_session.patch(litellm.acompletion)(**api_call_params) @@ -85,7 +81,7 @@ async def make_llm_api_call(messages, model_name, response_format=None, temperat response = await litellm.acompletion(**api_call_params) # Log the API response - logger.info(f"Received API response: {response}") + # logging.info(f"Received API response: {response}") return response @@ -104,24 +100,34 @@ if __name__ == "__main__": response = await make_llm_api_call(messages, model_name, stream=stream) if stream: - print("Streaming response:") + print("\n🤖 Streaming response:\n") + buffer = "" async for chunk in response: if isinstance(chunk, dict) and 'choices' in chunk: content = chunk['choices'][0]['delta'].get('content', '') - print(content, end='', flush=True) else: # For non-dict responses (like ModelResponse objects) content = chunk.choices[0].delta.content - if content: - print(content, end='', flush=True) - print("\nStream completed.") + + if content: + buffer += content + # Print complete words/sentences when we hit whitespace + if content[-1].isspace(): + print(buffer, end='', flush=True) + buffer = "" + + # Print any remaining content + if buffer: + print(buffer, flush=True) + print("\n✨ Stream completed.\n") else: - print("Non-streaming response:") + print("\n🤖 Response:\n") if isinstance(response, dict) and 'choices' in response: print(response['choices'][0]['message']['content']) else: # For non-dict responses (like ModelResponse objects) print(response.choices[0].message.content) + print() # Example usage: # asyncio.run(test_llm_api_call(stream=True)) # For streaming diff --git a/agentpress/thread_manager.py b/agentpress/thread_manager.py index 25875f00..fdc4c118 100644 --- a/agentpress/thread_manager.py +++ b/agentpress/thread_manager.py @@ -2,7 +2,7 @@ import json import logging import asyncio import os -from typing import List, Dict, Any, Optional, Callable, Type +from typing import List, Dict, Any, Optional, Callable, Type, Union, AsyncGenerator from agentpress.llm import make_llm_api_call from agentpress.tool import Tool, ToolResult from agentpress.tool_registry import ToolRegistry @@ -147,8 +147,11 @@ class ThreadManager: return True return False - async def run_thread(self, thread_id: str, system_message: Dict[str, Any], model_name: str, temperature: float = 0, max_tokens: Optional[int] = None, tool_choice: str = "auto", additional_message: Optional[Dict[str, Any]] = None, execute_tools_async: bool = True, execute_model_tool_calls: bool = True, use_tools: bool = False) -> Dict[str, Any]: - + async def run_thread(self, thread_id: str, system_message: Dict[str, Any], model_name: str, temperature: float = 0, max_tokens: Optional[int] = None, tool_choice: str = "auto", additional_message: Optional[Dict[str, Any]] = None, execute_tools_async: bool = True, execute_model_tool_calls: bool = True, use_tools: bool = False, stream: bool = False) -> Union[Dict[str, Any], AsyncGenerator]: + """ + Run a thread with the given parameters. If stream=True, returns an AsyncGenerator that yields response chunks. + Otherwise returns a Dict with the complete response. + """ messages = await self.list_messages(thread_id) prepared_messages = [system_message] + messages @@ -165,8 +168,35 @@ class ThreadManager: max_tokens=max_tokens, tools=tools, tool_choice=tool_choice if use_tools else None, - stream=False + stream=stream ) + + if stream: + return self._handle_streaming_response(thread_id, llm_response, use_tools, execute_model_tool_calls, execute_tools_async) + + # For non-streaming, handle the response as before + if use_tools and execute_model_tool_calls: + await self.handle_response_with_tools(thread_id, llm_response, execute_tools_async) + else: + await self.handle_response_without_tools(thread_id, llm_response) + + return { + "llm_response": llm_response, + "run_thread_params": { + "thread_id": thread_id, + "system_message": system_message, + "model_name": model_name, + "temperature": temperature, + "max_tokens": max_tokens, + "tool_choice": tool_choice, + "additional_message": additional_message, + "execute_tools_async": execute_tools_async, + "execute_model_tool_calls": execute_model_tool_calls, + "use_tools": use_tools, + "stream": stream + } + } + except Exception as e: logging.error(f"Error in API call: {str(e)}") return { @@ -182,30 +212,96 @@ class ThreadManager: "additional_message": additional_message, "execute_tools_async": execute_tools_async, "execute_model_tool_calls": execute_model_tool_calls, - "use_tools": use_tools + "use_tools": use_tools, + "stream": stream } } - if use_tools and execute_model_tool_calls: - await self.handle_response_with_tools(thread_id, llm_response, execute_tools_async) - else: - await self.handle_response_without_tools(thread_id, llm_response) + async def _handle_streaming_response(self, thread_id: str, response_stream: AsyncGenerator, use_tools: bool, execute_model_tool_calls: bool, execute_tools_async: bool) -> AsyncGenerator: + """Handle streaming response and tool execution""" + tool_calls_map = {} # Map to store tool calls by index + content_buffer = "" + + async def process_chunk(chunk): + nonlocal content_buffer + + # Process tool calls in the chunk + if hasattr(chunk.choices[0], 'delta'): + delta = chunk.choices[0].delta + + # Handle content if present + if hasattr(delta, 'content') and delta.content: + content_buffer += delta.content - return { - "llm_response": llm_response, - "run_thread_params": { - "thread_id": thread_id, - "system_message": system_message, - "model_name": model_name, - "temperature": temperature, - "max_tokens": max_tokens, - "tool_choice": tool_choice, - "additional_message": additional_message, - "execute_tools_async": execute_tools_async, - "execute_model_tool_calls": execute_model_tool_calls, - "use_tools": use_tools - } - } + # Handle tool calls + if hasattr(delta, 'tool_calls') and delta.tool_calls: + for tool_call in delta.tool_calls: + idx = tool_call.index + if idx not in tool_calls_map: + tool_calls_map[idx] = { + 'id': tool_call.id if tool_call.id else None, + 'type': 'function', + 'function': { + 'name': tool_call.function.name if tool_call.function.name else None, + 'arguments': '' + } + } + + current_tool = tool_calls_map[idx] + if tool_call.id: + current_tool['id'] = tool_call.id + if tool_call.function.name: + current_tool['function']['name'] = tool_call.function.name + if tool_call.function.arguments: + current_tool['function']['arguments'] += tool_call.function.arguments + + # If this is the final chunk with tool_calls finish_reason + if chunk.choices[0].finish_reason == 'tool_calls' and use_tools and execute_model_tool_calls: + try: + # Convert tool_calls_map to list and sort by index + tool_calls = [tool_calls_map[idx] for idx in sorted(tool_calls_map.keys())] + + # Create assistant message with tool calls and any content + assistant_message = { + "role": "assistant", + "content": content_buffer, + "tool_calls": tool_calls + } + await self.add_message(thread_id, assistant_message) + + # Process the complete tool calls + processed_tool_calls = [] + for tool_call in tool_calls: + try: + args_str = tool_call['function']['arguments'] + # Try to parse the string as JSON + tool_call['function']['arguments'] = json.loads(args_str) + processed_tool_calls.append(tool_call) + logging.info(f"Processed tool call: {tool_call}") + except json.JSONDecodeError as e: + logging.error(f"Error parsing tool call arguments: {e}, args: {args_str}") + continue + + # Execute tools with the processed tool calls + available_functions = self.get_available_functions() + if execute_tools_async: + tool_results = await self.execute_tools_async(processed_tool_calls, available_functions, thread_id) + else: + tool_results = await self.execute_tools_sync(processed_tool_calls, available_functions, thread_id) + + # Add tool results + for result in tool_results: + await self.add_message(thread_id, result) + logging.info(f"Tool execution result: {result}") + except Exception as e: + logging.error(f"Error executing tools: {str(e)}") + logging.error(f"Tool calls: {tool_calls}") + + return chunk + + async for chunk in response_stream: + processed_chunk = await process_chunk(chunk) + yield processed_chunk async def handle_response_without_tools(self, thread_id: str, response: Any): response_content = response.choices[0].message['content'] @@ -265,15 +361,24 @@ class ThreadManager: async def execute_tools_async(self, tool_calls, available_functions, thread_id): async def execute_single_tool(tool_call): - function_name = tool_call.function.name - function_args = json.loads(tool_call.function.arguments) - tool_call_id = tool_call.id + try: + if isinstance(tool_call, dict): + function_name = tool_call['function']['name'] + function_args = tool_call['function']['arguments'] # Already a dict + tool_call_id = tool_call['id'] + else: + function_name = tool_call.function.name + function_args = json.loads(tool_call.function.arguments) if isinstance(tool_call.function.arguments, str) else tool_call.function.arguments + tool_call_id = tool_call.id - function_to_call = available_functions.get(function_name) - if function_to_call: - return await self.execute_tool(function_to_call, function_args, function_name, tool_call_id) - else: - logging.warning(f"Function {function_name} not found in available functions") + function_to_call = available_functions.get(function_name) + if function_to_call: + return await self.execute_tool(function_to_call, function_args, function_name, tool_call_id) + else: + logging.warning(f"Function {function_name} not found in available functions") + return None + except Exception as e: + logging.error(f"Error executing tool: {str(e)}") return None tool_results = await asyncio.gather(*[execute_single_tool(tool_call) for tool_call in tool_calls]) @@ -282,17 +387,25 @@ class ThreadManager: async def execute_tools_sync(self, tool_calls, available_functions, thread_id): tool_results = [] for tool_call in tool_calls: - function_name = tool_call.function.name - function_args = json.loads(tool_call.function.arguments) - tool_call_id = tool_call.id + try: + if isinstance(tool_call, dict): + function_name = tool_call['function']['name'] + function_args = tool_call['function']['arguments'] # Already a dict + tool_call_id = tool_call['id'] + else: + function_name = tool_call.function.name + function_args = json.loads(tool_call.function.arguments) if isinstance(tool_call.function.arguments, str) else tool_call.function.arguments + tool_call_id = tool_call.id - function_to_call = available_functions.get(function_name) - if function_to_call: - result = await self.execute_tool(function_to_call, function_args, function_name, tool_call_id) - if result: - tool_results.append(result) - else: - logging.warning(f"Function {function_name} not found in available functions") + function_to_call = available_functions.get(function_name) + if function_to_call: + result = await self.execute_tool(function_to_call, function_args, function_name, tool_call_id) + if result: + tool_results.append(result) + else: + logging.warning(f"Function {function_name} not found in available functions") + except Exception as e: + logging.error(f"Error executing tool: {str(e)}") return tool_results @@ -320,54 +433,75 @@ class ThreadManager: if __name__ == "__main__": import asyncio - from tools.files_tool import FilesTool + from agentpress.examples.example_agent.tools.files_tool import FilesTool async def main(): manager = ThreadManager() - - manager.add_tool(FilesTool, ['create_file', 'read_file']) - + manager.add_tool(FilesTool, ['create_file']) thread_id = await manager.create_thread() - - await manager.add_message(thread_id, {"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}) - - system_message = {"role": "system", "content": "You are a helpful assistant that can create, read, update, and delete files."} - model_name = "gpt-4o" - # Test with tools - response_with_tools = await manager.run_thread( + # Add a test message + await manager.add_message(thread_id, { + "role": "user", + "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.." + }) + + system_message = { + "role": "system", + "content": "You are a helpful assistant that can create, read, update, and delete files." + } + model_name = "gpt-4o-mini" + + # Test with tools (non-streaming) + print("\n🤖 Testing non-streaming response with tools:") + response = await manager.run_thread( thread_id=thread_id, system_message=system_message, model_name=model_name, temperature=0.7, - max_tokens=150, - tool_choice="auto", - additional_message=None, - execute_tools_async=True, - execute_model_tool_calls=True, - use_tools=True + stream=False, + use_tools=True, + execute_model_tool_calls=True ) + + # Print the non-streaming response + if "error" in response: + print(f"Error: {response['message']}") + else: + print(response["llm_response"].choices[0].message.content) + print("\n✨ Response completed.\n") - print("Response with tools:", response_with_tools) - - # Test without tools - response_without_tools = await manager.run_thread( + # Test streaming + print("\n🤖 Testing streaming response:") + stream_response = await manager.run_thread( thread_id=thread_id, system_message=system_message, model_name=model_name, temperature=0.7, - max_tokens=150, - additional_message={"role": "user", "content": "What's the capital of France?"}, - use_tools=False + stream=True, + use_tools=True, + execute_model_tool_calls=True ) - print("Response without tools:", response_without_tools) - - # List messages in the thread - messages = await manager.list_messages(thread_id) - print("\nMessages in the thread:") - for msg in messages: - print(f"{msg['role'].capitalize()}: {msg['content']}") + buffer = "" + async for chunk in stream_response: + if isinstance(chunk, dict) and 'choices' in chunk: + content = chunk['choices'][0]['delta'].get('content', '') + else: + # For non-dict responses (like ModelResponse objects) + content = chunk.choices[0].delta.content + + if content: + buffer += content + # Print complete words/sentences when we hit whitespace + if content[-1].isspace(): + print(buffer, end='', flush=True) + buffer = "" + + # Print any remaining content + if buffer: + print(buffer, flush=True) + print("\n✨ Stream completed.\n") # Run the async main function asyncio.run(main()) diff --git a/poetry.lock b/poetry.lock index bd458040..80963eec 100644 --- a/poetry.lock +++ b/poetry.lock @@ -758,6 +758,17 @@ perf = ["ipython"] test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + [[package]] name = "jinja2" version = "3.1.4" @@ -1415,6 +1426,21 @@ tests = ["check-manifest", "coverage", "defusedxml", "markdown2", "olefile", "pa typing = ["typing-extensions"] xmp = ["defusedxml"] +[[package]] +name = "pluggy" +version = "1.5.0" +description = "plugin and hook calling mechanisms for python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, +] + +[package.extras] +dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] + [[package]] name = "prompt-toolkit" version = "3.0.36" @@ -1820,6 +1846,46 @@ files = [ [package.dependencies] pywin32 = {version = ">=226", markers = "platform_system == \"Windows\""} +[[package]] +name = "pytest" +version = "8.3.3" +description = "pytest: simple powerful testing with Python" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest-8.3.3-py3-none-any.whl", hash = "sha256:a6853c7375b2663155079443d2e45de913a911a11d669df02a50814944db57b2"}, + {file = "pytest-8.3.3.tar.gz", hash = "sha256:70b98107bd648308a7952b06e6ca9a50bc660be218d53c257cc1fc94fda10181"}, +] + +[package.dependencies] +colorama = {version = "*", markers = "sys_platform == \"win32\""} +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" +packaging = "*" +pluggy = ">=1.5,<2" +tomli = {version = ">=1", markers = "python_version < \"3.11\""} + +[package.extras] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] + +[[package]] +name = "pytest-asyncio" +version = "0.24.0" +description = "Pytest support for asyncio" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pytest_asyncio-0.24.0-py3-none-any.whl", hash = "sha256:a811296ed596b69bf0b6f3dc40f83bcaf341b155a269052d82efa2b25ac7037b"}, + {file = "pytest_asyncio-0.24.0.tar.gz", hash = "sha256:d081d828e576d85f875399194281e92bf8a68d60d72d1a2faf2feddb6c46b276"}, +] + +[package.dependencies] +pytest = ">=8.2,<9" + +[package.extras] +docs = ["sphinx (>=5.3)", "sphinx-rtd-theme (>=1.0)"] +testing = ["coverage (>=6.2)", "hypothesis (>=5.7.1)"] + [[package]] name = "python-dateutil" version = "2.9.0.post0" @@ -2535,6 +2601,17 @@ files = [ {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +[[package]] +name = "tomli" +version = "2.0.2" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.8" +files = [ + {file = "tomli-2.0.2-py3-none-any.whl", hash = "sha256:2ebe24485c53d303f690b0ec092806a085f07af5a5aa1464f3931eec36caaa38"}, + {file = "tomli-2.0.2.tar.gz", hash = "sha256:d46d457a85337051c36524bc5349dd91b1877838e2979ac5ced3e710ed8a60ed"}, +] + [[package]] name = "tornado" version = "6.4.1" @@ -2816,4 +2893,4 @@ type = ["pytest-mypy"] [metadata] lock-version = "2.0" python-versions = "^3.9" -content-hash = "f0fff448097f38773c4926c447e2d69c1bfcebafd29c6aefe9fc462db30c613d" +content-hash = "d4c229cc0ecd64741dcf73186dce1c90100230e57acca3aa589e66dbb3052e9d" diff --git a/pyproject.toml b/pyproject.toml index a9a9747f..27ab7c6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -28,6 +28,8 @@ questionary = "^2.0.1" requests = "^2.31.0" packaging = "^23.2" setuptools = "^75.3.0" +pytest = "^8.3.3" +pytest-asyncio = "^0.24.0" [tool.poetry.scripts] agentpress = "agentpress.cli:main" diff --git a/state.json b/state.json new file mode 100644 index 00000000..4e088863 --- /dev/null +++ b/state.json @@ -0,0 +1,22 @@ +{ + "files": { + "random_message.txt": { + "content": "Hello, world!" + }, + "random_file_2.txt": { + "content": "Hello, world!" + }, + "robotics_explanation_2.txt": { + "content": "Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements of mechanical engineering, electrical engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously." + }, + "random_file_1.txt": { + "content": "Hello, world!" + }, + "robotics_explanation.txt": { + "content": "Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements of computer science, mechanical engineering, and electrical engineering to create machines that can perform tasks autonomously or semi-autonomously, often mimicking human actions." + }, + "hello_message.txt": { + "content": "Hello, world!" + } + } +} \ No newline at end of file diff --git a/threads/0019ba22-c77c-450c-89c3-61444d157a20.json b/threads/0019ba22-c77c-450c-89c3-61444d157a20.json new file mode 100644 index 00000000..432fc265 --- /dev/null +++ b/threads/0019ba22-c77c-450c-89c3-61444d157a20.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_ifVBPhsz6hFh4rF6DZ0zbawV", "type": "function", "function": {"name": "create_file", "arguments": ""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "{\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "file"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "_path"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "\":\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "file"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "_"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "4"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "e"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "7"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "e"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "3"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "c"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": ".txt"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "\",\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "content"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "\":\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "Hello"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": ","}}, {"id": null, "type": "function", "function": {"name": null, "arguments": " world"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "!\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "}"}}]}, {"role": "assistant", "content": "Error processing tool calls"}]} \ No newline at end of file diff --git a/threads/01ef5082-7ebe-43be-9caa-ef66ff81968a.json b/threads/01ef5082-7ebe-43be-9caa-ef66ff81968a.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/01ef5082-7ebe-43be-9caa-ef66ff81968a.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/03eb66b2-bed2-4422-ac6f-66ab8af370f2.json b/threads/03eb66b2-bed2-4422-ac6f-66ab8af370f2.json new file mode 100644 index 00000000..53907698 --- /dev/null +++ b/threads/03eb66b2-bed2-4422-ac6f-66ab8af370f2.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help you create a file with \"Hello, world!\" and explain robotics.\n\nFirst, let me create a file with a random name (I'll use \"random_message.txt\"):", "tool_calls": [{"id": "toolu_016eMdJ7t3CnCn69AdBG6JWK", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_message.txt\", \"content\": \"Hello, world!\"}"}}]}]} \ No newline at end of file diff --git a/threads/04060f77-758f-4125-93f3-95c3a3058ea0.json b/threads/04060f77-758f-4125-93f3-95c3a3058ea0.json new file mode 100644 index 00000000..9345ce00 --- /dev/null +++ b/threads/04060f77-758f-4125-93f3-95c3a3058ea0.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_L8dN1sNycdOtlfEkJZ2dQA1k", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_1.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_d9LvaF8ZLf1AqmWlFmG7HGg3", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of technology that deals with the design, construction, operation, and application of robots. It combines elements of engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or with minimal human intervention.\"}"}}]}, {"role": "tool", "tool_call_id": "call_L8dN1sNycdOtlfEkJZ2dQA1k", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_1.txt' created successfully.\")"}, {"role": "tool", "tool_call_id": "call_d9LvaF8ZLf1AqmWlFmG7HGg3", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'robotics_explanation.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/0931a64f-88c7-4bd9-aa9d-5af76aa04428.json b/threads/0931a64f-88c7-4bd9-aa9d-5af76aa04428.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/0931a64f-88c7-4bd9-aa9d-5af76aa04428.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/10e39766-8977-4d55-9234-c304e35d6a23.json b/threads/10e39766-8977-4d55-9234-c304e35d6a23.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/10e39766-8977-4d55-9234-c304e35d6a23.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/1185012f-c411-4791-8968-d142f1f38006.json b/threads/1185012f-c411-4791-8968-d142f1f38006.json new file mode 100644 index 00000000..5e08712e --- /dev/null +++ b/threads/1185012f-c411-4791-8968-d142f1f38006.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help you create a file with \"Hello, world!\" and explain robotics.\n\nFirst, let me create a file with a random name (I'll use \"hello_message.txt\"):", "tool_calls": [{"id": "toolu_01UV5iijhhU1icuwtjczAfvj", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"hello_message.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01UV5iijhhU1icuwtjczAfvj", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'hello_message.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/1231438c-439e-4cff-ac93-11ef39c5d33a.json b/threads/1231438c-439e-4cff-ac93-11ef39c5d33a.json new file mode 100644 index 00000000..56038bfb --- /dev/null +++ b/threads/1231438c-439e-4cff-ac93-11ef39c5d33a.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_WnUnopRIUUZdwJ1I74YE6Sgw", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"HelloWorld.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_ZmUrI7VID1xrnPyXihWWbtCZ", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"RoboticsExplanation.txt\", \"content\": \"Robotics is a field of engineering and science that involves the design, construction, operation, and use of robots. It combines elements from various disciplines such as mechanical engineering, electrical engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously.\"}"}}]}, {"role": "tool", "tool_call_id": "call_WnUnopRIUUZdwJ1I74YE6Sgw", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'HelloWorld.txt' created successfully.\")"}, {"role": "tool", "tool_call_id": "call_ZmUrI7VID1xrnPyXihWWbtCZ", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'RoboticsExplanation.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/126c8950-c813-4bb9-853e-d5503fd91a06.json b/threads/126c8950-c813-4bb9-853e-d5503fd91a06.json new file mode 100644 index 00000000..771090d4 --- /dev/null +++ b/threads/126c8950-c813-4bb9-853e-d5503fd91a06.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_tYcwKtvXhxxqOhWRBnlqE5GB", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"file_9q8r2.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_tYcwKtvXhxxqOhWRBnlqE5GB", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'file_9q8r2.txt' created successfully.\")"}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/157bf707-f72c-4588-9d02-f5841fa42d61.json b/threads/157bf707-f72c-4588-9d02-f5841fa42d61.json new file mode 100644 index 00000000..b760f6ea --- /dev/null +++ b/threads/157bf707-f72c-4588-9d02-f5841fa42d61.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_ZCgL0C9rnjnehwuu8RznxhvK", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"random_file_1.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_ZCgL0C9rnjnehwuu8RznxhvK", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_1.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/1fed381a-53e0-4bde-9233-b613127af1ca.json b/threads/1fed381a-53e0-4bde-9233-b613127af1ca.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/1fed381a-53e0-4bde-9233-b613127af1ca.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/248de190-aeeb-4327-b76b-89226faf8212.json b/threads/248de190-aeeb-4327-b76b-89226faf8212.json new file mode 100644 index 00000000..aa32fd51 --- /dev/null +++ b/threads/248de190-aeeb-4327-b76b-89226faf8212.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01Xq58c4An1FyXjmaEZrJek9", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01Xq58c4An1FyXjmaEZrJek9", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/31ad882c-4b82-46bc-ad8d-ec4f90511c7c.json b/threads/31ad882c-4b82-46bc-ad8d-ec4f90511c7c.json new file mode 100644 index 00000000..36fe8b42 --- /dev/null +++ b/threads/31ad882c-4b82-46bc-ad8d-ec4f90511c7c.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_5NnsxUvvd9RwCZft4afxehF3", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"HelloWorld.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_E4lL7zozVznzyyohswUkwXlv", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"RoboticsExplanation.txt\", \"content\": \"Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It encompasses various fields such as mechanical engineering, electrical engineering, and computer science, aiming to create machines that can assist, enhance, or replace human activities.\"}"}}]}, {"role": "tool", "tool_call_id": "call_5NnsxUvvd9RwCZft4afxehF3", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'HelloWorld.txt' created successfully.\")"}, {"role": "tool", "tool_call_id": "call_E4lL7zozVznzyyohswUkwXlv", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'RoboticsExplanation.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/31e95197-2372-48e2-9def-078ea8d2a004.json b/threads/31e95197-2372-48e2-9def-078ea8d2a004.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/31e95197-2372-48e2-9def-078ea8d2a004.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/3eb036bb-616c-40d2-abe2-a1fffd3b2108.json b/threads/3eb036bb-616c-40d2-abe2-a1fffd3b2108.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/3eb036bb-616c-40d2-abe2-a1fffd3b2108.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/3f1f1028-a61d-4272-a03c-0f2b4774857e.json b/threads/3f1f1028-a61d-4272-a03c-0f2b4774857e.json new file mode 100644 index 00000000..1b0aa436 --- /dev/null +++ b/threads/3f1f1028-a61d-4272-a03c-0f2b4774857e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_lcuir4i7ed6ZFFrEQmhxZ3Z5", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements from mechanical engineering, electrical engineering, computer science, and other fields to create machines that can perform tasks autonomously or semi-autonomously.\"}"}}]}]} \ No newline at end of file diff --git a/threads/45197f69-5885-416c-bced-fb0f2fee319f.json b/threads/45197f69-5885-416c-bced-fb0f2fee319f.json new file mode 100644 index 00000000..3710acb2 --- /dev/null +++ b/threads/45197f69-5885-416c-bced-fb0f2fee319f.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_2721Q6lQZQn9eSTdL154wtNX", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_1.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_vI8qeKfnRmOS8kys68yte9Sn", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements of mechanical engineering, electrical engineering, and computer science to create machines capable of carrying out tasks autonomously or semi-autonomously.\"}"}}]}, {"role": "tool", "tool_call_id": "call_2721Q6lQZQn9eSTdL154wtNX", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file_1.txt' already exists. Use update_file to modify existing files.\")"}, {"role": "tool", "tool_call_id": "call_vI8qeKfnRmOS8kys68yte9Sn", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'robotics_explanation.txt' already exists. Use update_file to modify existing files.\")"}]} \ No newline at end of file diff --git a/threads/4d5a9d1c-69b4-4fd3-8208-b5723743388a.json b/threads/4d5a9d1c-69b4-4fd3-8208-b5723743388a.json new file mode 100644 index 00000000..06e9f197 --- /dev/null +++ b/threads/4d5a9d1c-69b4-4fd3-8208-b5723743388a.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_015uYogKd4UbYQ1WzxAJPdWw", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_015uYogKd4UbYQ1WzxAJPdWw", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file.txt' already exists. Use update_file to modify existing files.\")"}]} \ No newline at end of file diff --git a/threads/513c30a8-2ff3-4dc1-9ef8-808f1c5bde48.json b/threads/513c30a8-2ff3-4dc1-9ef8-808f1c5bde48.json new file mode 100644 index 00000000..40ea1dd8 --- /dev/null +++ b/threads/513c30a8-2ff3-4dc1-9ef8-808f1c5bde48.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01F6PBSUkbw6qypLfqzVWKEF", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01F6PBSUkbw6qypLfqzVWKEF", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file.txt' already exists. Use update_file to modify existing files.\")"}]} \ No newline at end of file diff --git a/threads/524f9cff-357c-461d-b166-899877936988.json b/threads/524f9cff-357c-461d-b166-899877936988.json new file mode 100644 index 00000000..94c46f82 --- /dev/null +++ b/threads/524f9cff-357c-461d-b166-899877936988.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Write a short story about a robot learning to paint"}]} \ No newline at end of file diff --git a/threads/525bb7a6-5da5-4907-8a64-ead9b4f97123.json b/threads/525bb7a6-5da5-4907-8a64-ead9b4f97123.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/525bb7a6-5da5-4907-8a64-ead9b4f97123.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/54965ca3-b6fd-4f21-8b3f-6a4b82ba201e.json b/threads/54965ca3-b6fd-4f21-8b3f-6a4b82ba201e.json new file mode 100644 index 00000000..030fdb32 --- /dev/null +++ b/threads/54965ca3-b6fd-4f21-8b3f-6a4b82ba201e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01A3atbEBWEafYkFuyx9nU5Y", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01A3atbEBWEafYkFuyx9nU5Y", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/59183ab0-0348-4c73-a044-c2cac3c31d97.json b/threads/59183ab0-0348-4c73-a044-c2cac3c31d97.json new file mode 100644 index 00000000..0c4cf604 --- /dev/null +++ b/threads/59183ab0-0348-4c73-a044-c2cac3c31d97.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_aphbtZPksl05nSO0S2Gmcxwe", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"random_file_12345.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_aphbtZPksl05nSO0S2Gmcxwe", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_12345.txt' created successfully.\")"}, {"role": "assistant", "content": "The file has been created successfully."}]} \ No newline at end of file diff --git a/threads/5d732243-ce5d-4a26-b81f-30af9305817f.json b/threads/5d732243-ce5d-4a26-b81f-30af9305817f.json new file mode 100644 index 00000000..db10f156 --- /dev/null +++ b/threads/5d732243-ce5d-4a26-b81f-30af9305817f.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_RbKHRKi5etUKjvw4Z1eSCKgH", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"file_3e2f7f9b.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_RbKHRKi5etUKjvw4Z1eSCKgH", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'file_3e2f7f9b.txt' created successfully.\")"}, {"role": "assistant", "content": "The file has been created successfully."}]} \ No newline at end of file diff --git a/threads/5e9c6a0c-d0a0-43c5-bc07-33f24b1da387.json b/threads/5e9c6a0c-d0a0-43c5-bc07-33f24b1da387.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/5e9c6a0c-d0a0-43c5-bc07-33f24b1da387.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/5f21ca3c-5125-4a8d-b50e-0a458527c0bf.json b/threads/5f21ca3c-5125-4a8d-b50e-0a458527c0bf.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/5f21ca3c-5125-4a8d-b50e-0a458527c0bf.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/63fdbd0f-62ed-40ab-95f5-7688e717051f.json b/threads/63fdbd0f-62ed-40ab-95f5-7688e717051f.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/63fdbd0f-62ed-40ab-95f5-7688e717051f.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/64cad164-5c78-4469-8ea1-f1d0d005c851.json b/threads/64cad164-5c78-4469-8ea1-f1d0d005c851.json new file mode 100644 index 00000000..06c07836 --- /dev/null +++ b/threads/64cad164-5c78-4469-8ea1-f1d0d005c851.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_11ATP0t4jLxgo7cQRkzTiJ53", "type": "function", "function": {"name": "create_file", "arguments": ""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "{\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "file"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "_path"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "\":\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "random"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "_file"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "_"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "163"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "9"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": ".txt"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "\",\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "content"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "\":\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "Hello"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": ","}}, {"id": null, "type": "function", "function": {"name": null, "arguments": " world"}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "!\""}}, {"id": null, "type": "function", "function": {"name": null, "arguments": "}"}}]}, {"role": "assistant", "content": "Error processing tool calls"}]} \ No newline at end of file diff --git a/threads/67235edb-73a5-42d3-a7fb-ef054c02b94b.json b/threads/67235edb-73a5-42d3-a7fb-ef054c02b94b.json new file mode 100644 index 00000000..00d8de8c --- /dev/null +++ b/threads/67235edb-73a5-42d3-a7fb-ef054c02b94b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help you create a file with \"Hello, world!\" and explain robotics.\n\nFirst, let me create the file with a random name (I'll use random_hello.txt):", "tool_calls": [{"id": "toolu_012PcxqUYBBdgPGC6FXHiNub", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_hello.txt\", \"content\": \"Hello, world!\"}"}}]}]} \ No newline at end of file diff --git a/threads/6c2c5dae-6e4c-4ce5-a20d-3cea2a2d8ab8.json b/threads/6c2c5dae-6e4c-4ce5-a20d-3cea2a2d8ab8.json new file mode 100644 index 00000000..2bded6ac --- /dev/null +++ b/threads/6c2c5dae-6e4c-4ce5-a20d-3cea2a2d8ab8.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_SBJshc9uPH0c4yCoLVznRGuw", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_123.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a field of technology that deals with the design, construction, operation, and use of robots. It combines elements of engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously, often mimicking human actions.\"}"}}]}]} \ No newline at end of file diff --git a/threads/6ed86014-a9ff-4052-987e-940a4535ec79.json b/threads/6ed86014-a9ff-4052-987e-940a4535ec79.json new file mode 100644 index 00000000..345846f1 --- /dev/null +++ b/threads/6ed86014-a9ff-4052-987e-940a4535ec79.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_vvFRJGrcl8REsQc29yoOsXgc", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_234.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of technology that involves the design, construction, operation, and use of robots. It combines elements from various fields such as engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously.\"}"}}]}]} \ No newline at end of file diff --git a/threads/6efd4fa8-8b55-4e46-aa76-04ec32bfa458.json b/threads/6efd4fa8-8b55-4e46-aa76-04ec32bfa458.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/6efd4fa8-8b55-4e46-aa76-04ec32bfa458.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/74683acc-297c-4f14-87c8-b63a65e4a7e3.json b/threads/74683acc-297c-4f14-87c8-b63a65e4a7e3.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/74683acc-297c-4f14-87c8-b63a65e4a7e3.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/7ed7e929-04fc-47da-a1ae-4676da10e74b.json b/threads/7ed7e929-04fc-47da-a1ae-4676da10e74b.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/7ed7e929-04fc-47da-a1ae-4676da10e74b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/7fb7c4f1-e7e6-4cf4-ad46-90a41632b5d3.json b/threads/7fb7c4f1-e7e6-4cf4-ad46-90a41632b5d3.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/7fb7c4f1-e7e6-4cf4-ad46-90a41632b5d3.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/81808950-dcf7-4ead-9405-e6e2692afb90.json b/threads/81808950-dcf7-4ead-9405-e6e2692afb90.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/81808950-dcf7-4ead-9405-e6e2692afb90.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/84b300dd-0ca3-4a2a-87ae-7f119b05ffd9.json b/threads/84b300dd-0ca3-4a2a-87ae-7f119b05ffd9.json new file mode 100644 index 00000000..67349e59 --- /dev/null +++ b/threads/84b300dd-0ca3-4a2a-87ae-7f119b05ffd9.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_015hXNgAM7DYQYKZNhmvQi7b", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_015hXNgAM7DYQYKZNhmvQi7b", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file.txt' already exists. Use update_file to modify existing files.\")"}]} \ No newline at end of file diff --git a/threads/8d701873-2d2d-44c4-b73b-16ee03ef468b.json b/threads/8d701873-2d2d-44c4-b73b-16ee03ef468b.json new file mode 100644 index 00000000..e6992862 --- /dev/null +++ b/threads/8d701873-2d2d-44c4-b73b-16ee03ef468b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_8HDgfXO8D9ZOS2psMcstS30G", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of technology that deals with the design, construction, operation, and application of robots. It combines elements of engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or with minimal human intervention.\"}"}}]}]} \ No newline at end of file diff --git a/threads/8f36ca63-ddbd-4f51-a565-df65dde85014.json b/threads/8f36ca63-ddbd-4f51-a565-df65dde85014.json new file mode 100644 index 00000000..b8437336 --- /dev/null +++ b/threads/8f36ca63-ddbd-4f51-a565-df65dde85014.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01UDXzxJXuLUHY5g3zABnSPd", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01UDXzxJXuLUHY5g3zABnSPd", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file.txt' already exists. Use update_file to modify existing files.\")"}]} \ No newline at end of file diff --git a/threads/8f94e598-954c-4799-b7c9-1d065799767e.json b/threads/8f94e598-954c-4799-b7c9-1d065799767e.json new file mode 100644 index 00000000..92cacc29 --- /dev/null +++ b/threads/8f94e598-954c-4799-b7c9-1d065799767e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01QK4j8JY5NUQr9JXi6sT5NU", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}]} \ No newline at end of file diff --git a/threads/9a9127fe-0368-4982-9ccf-7974f5b4720e.json b/threads/9a9127fe-0368-4982-9ccf-7974f5b4720e.json new file mode 100644 index 00000000..5c56c752 --- /dev/null +++ b/threads/9a9127fe-0368-4982-9ccf-7974f5b4720e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01NTmYzAqfqom3WoE2dHY2SS", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01NTmYzAqfqom3WoE2dHY2SS", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file.txt' already exists. Use update_file to modify existing files.\")"}]} \ No newline at end of file diff --git a/threads/9d28eade-d355-45f3-86e4-991af95d9e0b.json b/threads/9d28eade-d355-45f3-86e4-991af95d9e0b.json new file mode 100644 index 00000000..7b5229f2 --- /dev/null +++ b/threads/9d28eade-d355-45f3-86e4-991af95d9e0b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01NAXwhekog4iSjJYLCZ55Nd", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01NAXwhekog4iSjJYLCZ55Nd", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/9fc0768b-7390-4d34-9516-e77716ee8625.json b/threads/9fc0768b-7390-4d34-9516-e77716ee8625.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/9fc0768b-7390-4d34-9516-e77716ee8625.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/a33c9e7c-e820-4873-bbe7-c83b193bb98e.json b/threads/a33c9e7c-e820-4873-bbe7-c83b193bb98e.json new file mode 100644 index 00000000..9747a8da --- /dev/null +++ b/threads/a33c9e7c-e820-4873-bbe7-c83b193bb98e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_vSuNMDWY2QKAOjFDOY0cQIBt", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_1.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_u6zK3XwsQRyZsfkcXIrjN6WC", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements of computer science, mechanical engineering, and electrical engineering to create machines that can perform tasks autonomously or semi-autonomously, often mimicking human actions.\"}"}}]}, {"role": "tool", "tool_call_id": "call_vSuNMDWY2QKAOjFDOY0cQIBt", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_1.txt' created successfully.\")"}, {"role": "tool", "tool_call_id": "call_u6zK3XwsQRyZsfkcXIrjN6WC", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'robotics_explanation.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/a9f853fc-25e9-4efb-a643-72a54effb9a8.json b/threads/a9f853fc-25e9-4efb-a643-72a54effb9a8.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/a9f853fc-25e9-4efb-a643-72a54effb9a8.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/ac374aa0-204e-414c-a05e-f7bb877b6c0a.json b/threads/ac374aa0-204e-414c-a05e-f7bb877b6c0a.json new file mode 100644 index 00000000..8a9b15a4 --- /dev/null +++ b/threads/ac374aa0-204e-414c-a05e-f7bb877b6c0a.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_01CeyP4zWXFT1TaWoZkavFZn", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01CeyP4zWXFT1TaWoZkavFZn", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/b0593441-9ddd-4061-8634-d2a47e51b87e.json b/threads/b0593441-9ddd-4061-8634-d2a47e51b87e.json new file mode 100644 index 00000000..94c46f82 --- /dev/null +++ b/threads/b0593441-9ddd-4061-8634-d2a47e51b87e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Write a short story about a robot learning to paint"}]} \ No newline at end of file diff --git a/threads/b061f328-0b8c-4bd2-85ed-c2ba5d5ddf1d.json b/threads/b061f328-0b8c-4bd2-85ed-c2ba5d5ddf1d.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/b061f328-0b8c-4bd2-85ed-c2ba5d5ddf1d.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/b1090883-83f8-4e66-962f-f2e6e958e0ac.json b/threads/b1090883-83f8-4e66-962f-f2e6e958e0ac.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/b1090883-83f8-4e66-962f-f2e6e958e0ac.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/b2198c9b-1a98-4c57-8094-277d0490c353.json b/threads/b2198c9b-1a98-4c57-8094-277d0490c353.json new file mode 100644 index 00000000..7b4a203c --- /dev/null +++ b/threads/b2198c9b-1a98-4c57-8094-277d0490c353.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help you create a file with a random name and explain robotics to you.\n\nFirst, let me create a file with \"Hello, world!\" content. I'll give it a random name with a .txt extension:", "tool_calls": [{"id": "toolu_01HZ3tZJb28Jqu6jY5YEuJds", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_message.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01HZ3tZJb28Jqu6jY5YEuJds", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_message.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/b4eb1fac-d53f-4e4b-9207-616d9f81b0e7.json b/threads/b4eb1fac-d53f-4e4b-9207-616d9f81b0e7.json new file mode 100644 index 00000000..fddeb6bb --- /dev/null +++ b/threads/b4eb1fac-d53f-4e4b-9207-616d9f81b0e7.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_aecnVUxCb6gH6BwOqCfq29ui", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_834.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_Cx2digIDCL49LpvWLzjgF2oY", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of technology that involves the design, construction, operation, and use of robots. It combines elements of engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously, often mimicking human actions or handling complex jobs.\"}"}}]}, {"role": "tool", "tool_call_id": "call_aecnVUxCb6gH6BwOqCfq29ui", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_834.txt' created successfully.\")"}, {"role": "tool", "tool_call_id": "call_Cx2digIDCL49LpvWLzjgF2oY", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'robotics_explanation.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/b574f5f4-45ab-450c-8f38-4a6c069db9d5.json b/threads/b574f5f4-45ab-450c-8f38-4a6c069db9d5.json new file mode 100644 index 00000000..dc9d704a --- /dev/null +++ b/threads/b574f5f4-45ab-450c-8f38-4a6c069db9d5.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_Z5p21gljSAeh0N7KBotVTI9f", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"HelloWorld.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"RoboticsExplanation.txt\", \"content\": \"Robotics is a field of engineering and science that focuses on the design, construction, operation, and use of robots. It combines elements of mechanical engineering, electrical engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously.\"}"}}]}]} \ No newline at end of file diff --git a/threads/b68b1531-2044-40dd-ba9b-6bfea2786a8d.json b/threads/b68b1531-2044-40dd-ba9b-6bfea2786a8d.json new file mode 100644 index 00000000..f4a001d7 --- /dev/null +++ b/threads/b68b1531-2044-40dd-ba9b-6bfea2786a8d.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_BZubnIYWsfpG7MJvG89BHYy8", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"random_file_8675.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_BZubnIYWsfpG7MJvG89BHYy8", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_8675.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/b7771038-0bd0-487e-88b4-0587202bd52e.json b/threads/b7771038-0bd0-487e-88b4-0587202bd52e.json new file mode 100644 index 00000000..fc88e756 --- /dev/null +++ b/threads/b7771038-0bd0-487e-88b4-0587202bd52e.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_SjBICGr1p35ekvjLYrwePEfa", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_123.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of technology that involves the design, construction, operation, and use of robots. It encompasses various fields such as mechanical engineering, electrical engineering, computer science, and artificial intelligence. Robots are programmed to perform tasks autonomously or semi-autonomously, and they can be used in various applications, including manufacturing, healthcare, exploration, and more.\"}"}}]}]} \ No newline at end of file diff --git a/threads/c8063eb2-5694-4af2-bb1e-6ee49d62f2a6.json b/threads/c8063eb2-5694-4af2-bb1e-6ee49d62f2a6.json new file mode 100644 index 00000000..929ad6ba --- /dev/null +++ b/threads/c8063eb2-5694-4af2-bb1e-6ee49d62f2a6.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}]} \ No newline at end of file diff --git a/threads/c8928719-1263-4cf7-bc8d-c7b30819a4f6.json b/threads/c8928719-1263-4cf7-bc8d-c7b30819a4f6.json new file mode 100644 index 00000000..f69e5129 --- /dev/null +++ b/threads/c8928719-1263-4cf7-bc8d-c7b30819a4f6.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_zIxnoDypVx6mIYolAstGRikQ", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"random_file_1.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_zIxnoDypVx6mIYolAstGRikQ", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_1.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/cabee3ec-a870-4b84-94c6-4cb5e7bdcf7d.json b/threads/cabee3ec-a870-4b84-94c6-4cb5e7bdcf7d.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/cabee3ec-a870-4b84-94c6-4cb5e7bdcf7d.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/d349f505-3ba2-4c85-96f1-307794ce515b.json b/threads/d349f505-3ba2-4c85-96f1-307794ce515b.json new file mode 100644 index 00000000..07f9349d --- /dev/null +++ b/threads/d349f505-3ba2-4c85-96f1-307794ce515b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_xTQJUEqGqXbYUaVGUpL3Cb76", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_1.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_dOFJIUoAaDSUK69Y8yYau9Np", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"robotics_explanation.txt\", \"content\": \"Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements of mechanical engineering, electrical engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously.\"}"}}]}, {"role": "tool", "tool_call_id": "call_xTQJUEqGqXbYUaVGUpL3Cb76", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'random_file_1.txt' already exists. Use update_file to modify existing files.\")"}, {"role": "tool", "tool_call_id": "call_dOFJIUoAaDSUK69Y8yYau9Np", "name": "create_file", "content": "ToolResult(success=False, output=\"File 'robotics_explanation.txt' already exists. Use update_file to modify existing files.\")"}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_v5BNwSG1hUIXeCauV7RK280z", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_2.txt\", \"content\": \"Hello, world!\"}"}}, {"id": "call_r8Ra3HMWlUGam850zdLQKw7E", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"robotics_explanation_2.txt\", \"content\": \"Robotics is a branch of engineering and science that involves the design, construction, operation, and use of robots. It combines elements of mechanical engineering, electrical engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or semi-autonomously.\"}"}}]}, {"role": "tool", "tool_call_id": "call_v5BNwSG1hUIXeCauV7RK280z", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_file_2.txt' created successfully.\")"}, {"role": "tool", "tool_call_id": "call_r8Ra3HMWlUGam850zdLQKw7E", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'robotics_explanation_2.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/d7a0fb2a-5f2b-45ce-a1ca-9bdb3eb81301.json b/threads/d7a0fb2a-5f2b-45ce-a1ca-9bdb3eb81301.json new file mode 100644 index 00000000..1c2c31e9 --- /dev/null +++ b/threads/d7a0fb2a-5f2b-45ce-a1ca-9bdb3eb81301.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_praKFTId10kTJokJQXJMy55V", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_6582.txt\", \"content\": \"Hello, world!\"}"}}]}]} \ No newline at end of file diff --git a/threads/d9c90de9-4104-4082-87c1-ff6b4a40c0c5.json b/threads/d9c90de9-4104-4082-87c1-ff6b4a40c0c5.json new file mode 100644 index 00000000..a33fa152 --- /dev/null +++ b/threads/d9c90de9-4104-4082-87c1-ff6b4a40c0c5.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help you create a file with a random name and explain robotics to you.\n\nFirst, I'll create a file with \"Hello, world!\" content. I'll give it a random name with a .txt extension:", "tool_calls": [{"id": "toolu_01Wms2y6z4xQn1CXjUwVeWNK", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_message.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01Wms2y6z4xQn1CXjUwVeWNK", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'random_message.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/de5e09c3-cc03-4209-a53b-f032a6412412.json b/threads/de5e09c3-cc03-4209-a53b-f032a6412412.json new file mode 100644 index 00000000..af4d38f3 --- /dev/null +++ b/threads/de5e09c3-cc03-4209-a53b-f032a6412412.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_lcuir4i7ed6ZFFrEQmhxZ3Z5", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file_1.txt\", \"content\": \"Hello, world!\"}{\"file_path\": \"random_file_2.txt\", \"content\": \"Robotics is a multidisciplinary field that involves the design, construction, operation, and use of robots. It combines elements of engineering, computer science, and artificial intelligence to create machines that can perform tasks autonomously or with minimal human intervention.\"}"}}]}]} \ No newline at end of file diff --git a/threads/df28355f-6afa-4e7e-b6c4-dbcc0bf49a39.json b/threads/df28355f-6afa-4e7e-b6c4-dbcc0bf49a39.json new file mode 100644 index 00000000..c7107aa5 --- /dev/null +++ b/threads/df28355f-6afa-4e7e-b6c4-dbcc0bf49a39.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help create a file with \"Hello, world!\" and explain robotics to you.\n\nFirst, let me create a file with a random name:", "tool_calls": [{"id": "toolu_01JssmQS26kjXGEJmJ1q5rkc", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_message.txt\", \"content\": \"Hello, world!\"}"}}]}]} \ No newline at end of file diff --git a/threads/e7822f39-51a7-49c0-bd11-ea8a6c8068bc.json b/threads/e7822f39-51a7-49c0-bd11-ea8a6c8068bc.json new file mode 100644 index 00000000..1246e06b --- /dev/null +++ b/threads/e7822f39-51a7-49c0-bd11-ea8a6c8068bc.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}, {"role": "assistant", "content": "", "tool_calls": [{"id": "call_8lIsiFpOWPeTk6MgG14v7NVP", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\":\"file_8723.txt\",\"content\":\"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "call_8lIsiFpOWPeTk6MgG14v7NVP", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'file_8723.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/f28c12d7-9ea6-4e56-96ad-8c030cd8f1be.json b/threads/f28c12d7-9ea6-4e56-96ad-8c030cd8f1be.json new file mode 100644 index 00000000..6f7a3a49 --- /dev/null +++ b/threads/f28c12d7-9ea6-4e56-96ad-8c030cd8f1be.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": "", "tool_calls": [{"id": "toolu_012fBBnKdpWzqDhah8DyeSKm", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"random_file.txt\", \"content\": \"Hello, world!\"}"}}]}]} \ No newline at end of file diff --git a/threads/f470fdf9-f7bd-43e7-a007-7a26a4dff689.json b/threads/f470fdf9-f7bd-43e7-a007-7a26a4dff689.json new file mode 100644 index 00000000..fabc563b --- /dev/null +++ b/threads/f470fdf9-f7bd-43e7-a007-7a26a4dff689.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!'"}]} \ No newline at end of file diff --git a/threads/f7113782-3233-4551-80cb-e39cff401b0b.json b/threads/f7113782-3233-4551-80cb-e39cff401b0b.json new file mode 100644 index 00000000..2020523a --- /dev/null +++ b/threads/f7113782-3233-4551-80cb-e39cff401b0b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Dont explain anything just create the file."}, {"role": "assistant", "content": ""}]} \ No newline at end of file diff --git a/threads/f8fc3861-eedf-457f-a2ec-a0693c247b8b.json b/threads/f8fc3861-eedf-457f-a2ec-a0693c247b8b.json new file mode 100644 index 00000000..533221df --- /dev/null +++ b/threads/f8fc3861-eedf-457f-a2ec-a0693c247b8b.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Please create a file with a random name with the content 'Hello, world!' Explain what robotics is in a short message to me.."}, {"role": "assistant", "content": "I'll help you create a file with \"Hello, world!\" and explain robotics.\n\nFirst, let me create a file with a random name (I'll use \"hello_message.txt\"):", "tool_calls": [{"id": "toolu_01R6egbgSckmme73GKwsQXUM", "type": "function", "function": {"name": "create_file", "arguments": "{\"file_path\": \"hello_message.txt\", \"content\": \"Hello, world!\"}"}}]}, {"role": "tool", "tool_call_id": "toolu_01R6egbgSckmme73GKwsQXUM", "name": "create_file", "content": "ToolResult(success=True, output=\"File 'hello_message.txt' created successfully.\")"}]} \ No newline at end of file diff --git a/threads/fab29336-dc19-433e-af99-04c632cb5709.json b/threads/fab29336-dc19-433e-af99-04c632cb5709.json new file mode 100644 index 00000000..94c46f82 --- /dev/null +++ b/threads/fab29336-dc19-433e-af99-04c632cb5709.json @@ -0,0 +1 @@ +{"messages": [{"role": "user", "content": "Write a short story about a robot learning to paint"}]} \ No newline at end of file