letta-nightly 0.6.16.dev20250129104019__tar.gz → 0.6.18.dev20250130001035__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of letta-nightly might be problematic. Click here for more details.
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/PKG-INFO +4 -4
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/__init__.py +1 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/agent.py +1 -3
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/client/client.py +5 -5
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/client/streaming.py +29 -20
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/constants.py +1 -1
- letta_nightly-0.6.18.dev20250130001035/letta/functions/function_sets/multi_agent.py +102 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/functions.py +0 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/helpers.py +149 -9
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/llm_api_tools.py +20 -12
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/openai.py +15 -13
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/agent.py +14 -2
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/custom_columns.py +3 -3
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/job.py +1 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/sqlalchemy_base.py +12 -4
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/enums.py +8 -4
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/job.py +17 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/letta_request.py +2 -7
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/llm_config.py +9 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/message.py +51 -22
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/openai/chat_completion_response.py +2 -2
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/run.py +1 -2
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/tool_rule.py +1 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/app.py +5 -1
- letta_nightly-0.6.18.dev20250130001035/letta/server/rest_api/chat_completions_interface.py +256 -0
- letta_nightly-0.6.18.dev20250130001035/letta/server/rest_api/optimistic_json_parser.py +185 -0
- letta_nightly-0.6.18.dev20250130001035/letta/server/rest_api/routers/openai/chat_completions/chat_completions.py +161 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/agents.py +22 -32
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/server.py +12 -12
- letta_nightly-0.6.18.dev20250130001035/letta/services/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/job_manager.py +7 -12
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/tool_manager.py +17 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/system.py +20 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/utils.py +24 -1
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/pyproject.toml +4 -4
- letta_nightly-0.6.16.dev20250129104019/letta/functions/function_sets/multi_agent.py +0 -96
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/LICENSE +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/README.md +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/__main__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/benchmark/benchmark.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/benchmark/constants.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/chat_only_agent.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/cli/cli.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/cli/cli_config.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/cli/cli_load.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/client/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/client/utils.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/config.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/data_sources/connectors.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/data_sources/connectors_helper.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/embeddings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/errors.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/ast_parsers.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/function_sets/base.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/function_sets/extras.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/functions/schema_generator.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/helpers/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/helpers/tool_rule_solver.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/humans/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/humans/examples/basic.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/humans/examples/cs_phd.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/interface.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/anthropic.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/aws_bedrock.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/azure_openai.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/azure_openai_constants.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/cohere.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/google_ai.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/helpers.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/llm_api/mistral.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/README.md +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/chat_completion_proxy.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/constants.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/function_parser.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/grammars/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/grammars/gbnf_grammar_generator.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/grammars/json.gbnf +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/grammars/json_func_calls_with_inner_thoughts.gbnf +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/json_parser.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/koboldcpp/api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/koboldcpp/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llamacpp/api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llamacpp/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/airoboros.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/chatml.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/configurable_wrapper.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/dolphin.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/llama3.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/simple_summary_wrapper.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/wrapper_base.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/llm_chat_completion_wrappers/zephyr.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/lmstudio/api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/lmstudio/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/ollama/api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/ollama/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/settings/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/settings/deterministic_mirostat.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/settings/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/settings/simple.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/utils.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/vllm/api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/webui/api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/webui/legacy_api.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/webui/legacy_settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/local_llm/webui/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/log.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/main.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/memory.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/offline_memory_agent.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/openai_backcompat/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/openai_backcompat/openai_object.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/__all__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/agents_tags.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/base.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/block.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/blocks_agents.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/enums.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/errors.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/file.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/job_messages.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/message.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/mixins.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/organization.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/passage.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/provider.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/sandbox_config.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/source.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/sources_agents.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/sqlite_functions.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/step.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/tool.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/tools_agents.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/orm/user.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/anna_pa.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/google_search_persona.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/memgpt_doc.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/memgpt_starter.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/o1_persona.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/offline_memory_persona.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/sam.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/sam_pov.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/sam_simple_pov_gpt35.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/personas/examples/sqldb/test.db +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/gpt_summarize.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/gpt_system.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_base.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_chat.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_chat_compressed.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_chat_fstring.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_convo_only.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_doc.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_gpt35_extralong.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_intuitive_knowledge.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_modified_chat.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_modified_o1.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_offline_memory.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/prompts/system/memgpt_offline_memory_chat.txt +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/pytest.ini +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/agent.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/block.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/embedding_config.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/embedding_config_overrides.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/environment_variables.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/file.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/health.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/letta_base.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/letta_message.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/letta_response.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/llm_config_overrides.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/memory.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/openai/chat_completion_request.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/openai/chat_completions.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/openai/embedding_response.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/openai/openai.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/organization.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/passage.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/providers.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/sandbox_config.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/source.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/step.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/tool.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/usage.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/schemas/user.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/constants.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/generate_openapi_schema.sh +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/auth/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/auth/index.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/auth_token.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/interface.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019/letta/server/ws_api → letta_nightly-0.6.18.dev20250130001035/letta/server/rest_api/routers/openai/chat_completions}/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/blocks.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/health.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/jobs.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/llms.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/organizations.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/providers.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/runs.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/sandbox_configs.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/sources.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/tags.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/tools.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/routers/v1/users.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/static_files.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/rest_api/utils.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/startup.sh +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/static_files/assets/index-048c9598.js +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/static_files/assets/index-0e31b727.css +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/static_files/favicon.ico +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/static_files/index.html +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/static_files/memgpt_logo_transparent.png +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/utils.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019/letta/services → letta_nightly-0.6.18.dev20250130001035/letta/server/ws_api}/__init__.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/ws_api/example_client.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/ws_api/interface.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/ws_api/protocol.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/server/ws_api/server.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/agent_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/block_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/helpers/agent_manager_helper.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/message_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/organization_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/passage_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/per_agent_lock_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/provider_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/sandbox_config_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/source_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/step_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/tool_execution_sandbox.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/services/user_manager.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/settings.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/streaming_interface.py +0 -0
- {letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/streaming_utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: letta-nightly
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.18.dev20250130001035
|
|
4
4
|
Summary: Create LLM agents with long-term memory and custom tools
|
|
5
5
|
License: Apache License
|
|
6
6
|
Author: Letta Team
|
|
@@ -26,8 +26,8 @@ Requires-Dist: autoflake (>=2.3.0,<3.0.0) ; extra == "dev" or extra == "all"
|
|
|
26
26
|
Requires-Dist: black[jupyter] (>=24.2.0,<25.0.0) ; extra == "dev" or extra == "all"
|
|
27
27
|
Requires-Dist: brotli (>=1.1.0,<2.0.0)
|
|
28
28
|
Requires-Dist: colorama (>=0.4.6,<0.5.0)
|
|
29
|
-
Requires-Dist: composio-core (>=0.6.
|
|
30
|
-
Requires-Dist: composio-langchain (>=0.6.
|
|
29
|
+
Requires-Dist: composio-core (>=0.6.19,<0.7.0)
|
|
30
|
+
Requires-Dist: composio-langchain (>=0.6.19,<0.7.0)
|
|
31
31
|
Requires-Dist: datasets (>=2.14.6,<3.0.0) ; extra == "dev" or extra == "all"
|
|
32
32
|
Requires-Dist: demjson3 (>=3.0.6,<4.0.0)
|
|
33
33
|
Requires-Dist: docker (>=7.1.0,<8.0.0) ; extra == "external-tools" or extra == "all"
|
|
@@ -44,7 +44,7 @@ Requires-Dist: isort (>=5.13.2,<6.0.0) ; extra == "dev" or extra == "all"
|
|
|
44
44
|
Requires-Dist: jinja2 (>=3.1.5,<4.0.0)
|
|
45
45
|
Requires-Dist: langchain (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
|
|
46
46
|
Requires-Dist: langchain-community (>=0.3.7,<0.4.0) ; extra == "external-tools" or extra == "all"
|
|
47
|
-
Requires-Dist: letta_client (>=0.1.
|
|
47
|
+
Requires-Dist: letta_client (>=0.1.23,<0.2.0)
|
|
48
48
|
Requires-Dist: llama-index (>=0.12.2,<0.13.0)
|
|
49
49
|
Requires-Dist: llama-index-embeddings-openai (>=0.3.1,<0.4.0)
|
|
50
50
|
Requires-Dist: locust (>=2.31.5,<3.0.0) ; extra == "dev" or extra == "all"
|
{letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/agent.py
RENAMED
|
@@ -108,9 +108,6 @@ class Agent(BaseAgent):
|
|
|
108
108
|
if not isinstance(rule, TerminalToolRule):
|
|
109
109
|
warnings.warn("Tool rules only work reliably for the latest OpenAI models that support structured outputs.")
|
|
110
110
|
break
|
|
111
|
-
# add default rule for having send_message be a terminal tool
|
|
112
|
-
if agent_state.tool_rules is None:
|
|
113
|
-
agent_state.tool_rules = []
|
|
114
111
|
|
|
115
112
|
self.tool_rules_solver = ToolRulesSolver(tool_rules=agent_state.tool_rules)
|
|
116
113
|
|
|
@@ -238,6 +235,7 @@ class Agent(BaseAgent):
|
|
|
238
235
|
# TODO: This is only temporary, can remove after we publish a pip package with this object
|
|
239
236
|
agent_state_copy = self.agent_state.__deepcopy__()
|
|
240
237
|
agent_state_copy.tools = []
|
|
238
|
+
agent_state_copy.tool_rules = []
|
|
241
239
|
|
|
242
240
|
sandbox_run_result = ToolExecutionSandbox(function_name, function_args, self.user).run(agent_state=agent_state_copy)
|
|
243
241
|
function_response, updated_agent_state = sandbox_run_result.func_return, sandbox_run_result.agent_state
|
|
@@ -280,7 +280,7 @@ class AbstractClient(object):
|
|
|
280
280
|
|
|
281
281
|
def get_messages(
|
|
282
282
|
self, agent_id: str, after: Optional[str] = None, before: Optional[str] = None, limit: Optional[int] = 1000
|
|
283
|
-
) -> List[
|
|
283
|
+
) -> List[LettaMessage]:
|
|
284
284
|
raise NotImplementedError
|
|
285
285
|
|
|
286
286
|
def list_model_configs(self) -> List[LLMConfig]:
|
|
@@ -812,7 +812,6 @@ class RESTClient(AbstractClient):
|
|
|
812
812
|
Returns:
|
|
813
813
|
memory (Memory): In-context memory of the agent
|
|
814
814
|
"""
|
|
815
|
-
|
|
816
815
|
response = requests.get(f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/core-memory", headers=self.headers)
|
|
817
816
|
if response.status_code != 200:
|
|
818
817
|
raise ValueError(f"Failed to get in-context memory: {response.text}")
|
|
@@ -966,7 +965,7 @@ class RESTClient(AbstractClient):
|
|
|
966
965
|
|
|
967
966
|
def get_messages(
|
|
968
967
|
self, agent_id: str, before: Optional[str] = None, after: Optional[str] = None, limit: Optional[int] = 1000
|
|
969
|
-
) -> List[
|
|
968
|
+
) -> List[LettaMessage]:
|
|
970
969
|
"""
|
|
971
970
|
Get messages from an agent with pagination.
|
|
972
971
|
|
|
@@ -984,7 +983,7 @@ class RESTClient(AbstractClient):
|
|
|
984
983
|
response = requests.get(f"{self.base_url}/{self.api_prefix}/agents/{agent_id}/messages", params=params, headers=self.headers)
|
|
985
984
|
if response.status_code != 200:
|
|
986
985
|
raise ValueError(f"Failed to get messages: {response.text}")
|
|
987
|
-
return [
|
|
986
|
+
return [LettaMessage(**message) for message in response.json()]
|
|
988
987
|
|
|
989
988
|
def send_message(
|
|
990
989
|
self,
|
|
@@ -3356,7 +3355,7 @@ class LocalClient(AbstractClient):
|
|
|
3356
3355
|
|
|
3357
3356
|
def get_messages(
|
|
3358
3357
|
self, agent_id: str, before: Optional[str] = None, after: Optional[str] = None, limit: Optional[int] = 1000
|
|
3359
|
-
) -> List[
|
|
3358
|
+
) -> List[LettaMessage]:
|
|
3360
3359
|
"""
|
|
3361
3360
|
Get messages from an agent with pagination.
|
|
3362
3361
|
|
|
@@ -3378,6 +3377,7 @@ class LocalClient(AbstractClient):
|
|
|
3378
3377
|
after=after,
|
|
3379
3378
|
limit=limit,
|
|
3380
3379
|
reverse=True,
|
|
3380
|
+
return_message_object=False,
|
|
3381
3381
|
)
|
|
3382
3382
|
|
|
3383
3383
|
def list_blocks(self, label: Optional[str] = None, templates_only: Optional[bool] = True) -> List[Block]:
|
|
@@ -1,18 +1,22 @@
|
|
|
1
1
|
import json
|
|
2
|
-
from typing import Generator
|
|
2
|
+
from typing import Generator, Union, get_args
|
|
3
3
|
|
|
4
4
|
import httpx
|
|
5
5
|
from httpx_sse import SSEError, connect_sse
|
|
6
|
+
from openai.types.chat.chat_completion_chunk import ChatCompletionChunk
|
|
6
7
|
|
|
7
8
|
from letta.constants import OPENAI_CONTEXT_WINDOW_ERROR_SUBSTRING
|
|
8
9
|
from letta.errors import LLMError
|
|
10
|
+
from letta.log import get_logger
|
|
9
11
|
from letta.schemas.enums import MessageStreamStatus
|
|
10
12
|
from letta.schemas.letta_message import AssistantMessage, ReasoningMessage, ToolCallMessage, ToolReturnMessage
|
|
11
13
|
from letta.schemas.letta_response import LettaStreamingResponse
|
|
12
14
|
from letta.schemas.usage import LettaUsageStatistics
|
|
13
15
|
|
|
16
|
+
logger = get_logger(__name__)
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+
|
|
19
|
+
def _sse_post(url: str, data: dict, headers: dict) -> Generator[Union[LettaStreamingResponse, ChatCompletionChunk], None, None]:
|
|
16
20
|
|
|
17
21
|
with httpx.Client() as client:
|
|
18
22
|
with connect_sse(client, method="POST", url=url, json=data, headers=headers) as event_source:
|
|
@@ -20,22 +24,26 @@ def _sse_post(url: str, data: dict, headers: dict) -> Generator[LettaStreamingRe
|
|
|
20
24
|
# Inspect for errors before iterating (see https://github.com/florimondmanca/httpx-sse/pull/12)
|
|
21
25
|
if not event_source.response.is_success:
|
|
22
26
|
# handle errors
|
|
23
|
-
|
|
27
|
+
pass
|
|
24
28
|
|
|
25
|
-
|
|
26
|
-
|
|
29
|
+
logger.warning("Caught error before iterating SSE request:", vars(event_source.response))
|
|
30
|
+
logger.warning(event_source.response.read().decode("utf-8"))
|
|
27
31
|
|
|
28
32
|
try:
|
|
29
33
|
response_bytes = event_source.response.read()
|
|
30
34
|
response_dict = json.loads(response_bytes.decode("utf-8"))
|
|
31
|
-
error_message = response_dict["error"]["message"]
|
|
32
35
|
# e.g.: This model's maximum context length is 8192 tokens. However, your messages resulted in 8198 tokens (7450 in the messages, 748 in the functions). Please reduce the length of the messages or functions.
|
|
33
|
-
if
|
|
34
|
-
|
|
36
|
+
if (
|
|
37
|
+
"error" in response_dict
|
|
38
|
+
and "message" in response_dict["error"]
|
|
39
|
+
and OPENAI_CONTEXT_WINDOW_ERROR_SUBSTRING in response_dict["error"]["message"]
|
|
40
|
+
):
|
|
41
|
+
logger.error(response_dict["error"]["message"])
|
|
42
|
+
raise LLMError(response_dict["error"]["message"])
|
|
35
43
|
except LLMError:
|
|
36
44
|
raise
|
|
37
45
|
except:
|
|
38
|
-
|
|
46
|
+
logger.error(f"Failed to parse SSE message, throwing SSE HTTP error up the stack")
|
|
39
47
|
event_source.response.raise_for_status()
|
|
40
48
|
|
|
41
49
|
try:
|
|
@@ -58,33 +66,34 @@ def _sse_post(url: str, data: dict, headers: dict) -> Generator[LettaStreamingRe
|
|
|
58
66
|
yield ToolReturnMessage(**chunk_data)
|
|
59
67
|
elif "step_count" in chunk_data:
|
|
60
68
|
yield LettaUsageStatistics(**chunk_data)
|
|
69
|
+
elif chunk_data.get("object") == get_args(ChatCompletionChunk.__annotations__["object"])[0]:
|
|
70
|
+
yield ChatCompletionChunk(**chunk_data) # Add your processing logic for chat chunks here
|
|
61
71
|
else:
|
|
62
72
|
raise ValueError(f"Unknown message type in chunk_data: {chunk_data}")
|
|
63
73
|
|
|
64
74
|
except SSEError as e:
|
|
65
|
-
|
|
75
|
+
logger.error("Caught an error while iterating the SSE stream:", str(e))
|
|
66
76
|
if "application/json" in str(e): # Check if the error is because of JSON response
|
|
67
77
|
# TODO figure out a better way to catch the error other than re-trying with a POST
|
|
68
78
|
response = client.post(url=url, json=data, headers=headers) # Make the request again to get the JSON response
|
|
69
79
|
if response.headers["Content-Type"].startswith("application/json"):
|
|
70
80
|
error_details = response.json() # Parse the JSON to get the error message
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
81
|
+
logger.error("Request:", vars(response.request))
|
|
82
|
+
logger.error("POST Error:", error_details)
|
|
83
|
+
logger.error("Original SSE Error:", str(e))
|
|
74
84
|
else:
|
|
75
|
-
|
|
85
|
+
logger.error("Failed to retrieve JSON error message via retry.")
|
|
76
86
|
else:
|
|
77
|
-
|
|
87
|
+
logger.error("SSEError not related to 'application/json' content type.")
|
|
78
88
|
|
|
79
89
|
# Optionally re-raise the exception if you need to propagate it
|
|
80
90
|
raise e
|
|
81
91
|
|
|
82
92
|
except Exception as e:
|
|
83
93
|
if event_source.response.request is not None:
|
|
84
|
-
|
|
94
|
+
logger.error("HTTP Request:", vars(event_source.response.request))
|
|
85
95
|
if event_source.response is not None:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
print("Exception message:", str(e))
|
|
96
|
+
logger.error("HTTP Status:", event_source.response.status_code)
|
|
97
|
+
logger.error("HTTP Headers:", event_source.response.headers)
|
|
98
|
+
logger.error("Exception message:", str(e))
|
|
90
99
|
raise e
|
{letta_nightly-0.6.16.dev20250129104019 → letta_nightly-0.6.18.dev20250130001035}/letta/constants.py
RENAMED
|
@@ -50,7 +50,7 @@ BASE_TOOLS = ["send_message", "conversation_search", "archival_memory_insert", "
|
|
|
50
50
|
# Base memory tools CAN be edited, and are added by default by the server
|
|
51
51
|
BASE_MEMORY_TOOLS = ["core_memory_append", "core_memory_replace"]
|
|
52
52
|
# Multi agent tools
|
|
53
|
-
MULTI_AGENT_TOOLS = ["
|
|
53
|
+
MULTI_AGENT_TOOLS = ["send_message_to_agent_and_wait_for_reply", "send_message_to_agents_matching_all_tags", "send_message_to_agent_async"]
|
|
54
54
|
MULTI_AGENT_SEND_MESSAGE_MAX_RETRIES = 3
|
|
55
55
|
MULTI_AGENT_SEND_MESSAGE_TIMEOUT = 20 * 60
|
|
56
56
|
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
from typing import TYPE_CHECKING, List
|
|
3
|
+
|
|
4
|
+
from letta.constants import MULTI_AGENT_SEND_MESSAGE_MAX_RETRIES, MULTI_AGENT_SEND_MESSAGE_TIMEOUT
|
|
5
|
+
from letta.functions.helpers import async_send_message_with_retries, execute_send_message_to_agent, fire_and_forget_send_to_agent
|
|
6
|
+
from letta.schemas.enums import MessageRole
|
|
7
|
+
from letta.schemas.message import MessageCreate
|
|
8
|
+
from letta.server.rest_api.utils import get_letta_server
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from letta.agent import Agent
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
def send_message_to_agent_and_wait_for_reply(self: "Agent", message: str, other_agent_id: str) -> str:
|
|
15
|
+
"""
|
|
16
|
+
Sends a message to a specific Letta agent within the same organization and waits for a response. The sender's identity is automatically included, so no explicit introduction is needed in the message. This function is designed for two-way communication where a reply is expected.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
message (str): The content of the message to be sent to the target agent.
|
|
20
|
+
other_agent_id (str): The unique identifier of the target Letta agent.
|
|
21
|
+
|
|
22
|
+
Returns:
|
|
23
|
+
str: The response from the target agent.
|
|
24
|
+
"""
|
|
25
|
+
messages = [MessageCreate(role=MessageRole.user, content=message, name=self.agent_state.name)]
|
|
26
|
+
return execute_send_message_to_agent(
|
|
27
|
+
sender_agent=self,
|
|
28
|
+
messages=messages,
|
|
29
|
+
other_agent_id=other_agent_id,
|
|
30
|
+
log_prefix="[send_message_to_agent_and_wait_for_reply]",
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
def send_message_to_agent_async(self: "Agent", message: str, other_agent_id: str) -> str:
|
|
35
|
+
"""
|
|
36
|
+
Sends a message to a specific Letta agent within the same organization. The sender's identity is automatically included, so no explicit introduction is required in the message. This function does not expect a response from the target agent, making it suitable for notifications or one-way communication.
|
|
37
|
+
|
|
38
|
+
Args:
|
|
39
|
+
message (str): The content of the message to be sent to the target agent.
|
|
40
|
+
other_agent_id (str): The unique identifier of the target Letta agent.
|
|
41
|
+
|
|
42
|
+
Returns:
|
|
43
|
+
str: A confirmation message indicating the message was successfully sent.
|
|
44
|
+
"""
|
|
45
|
+
message = (
|
|
46
|
+
f"[Incoming message from agent with ID '{self.agent_state.id}' - to reply to this message, "
|
|
47
|
+
f"make sure to use the 'send_message_to_agent_async' tool, or the agent will not receive your message] "
|
|
48
|
+
f"{message}"
|
|
49
|
+
)
|
|
50
|
+
messages = [MessageCreate(role=MessageRole.system, content=message, name=self.agent_state.name)]
|
|
51
|
+
|
|
52
|
+
# Do the actual fire-and-forget
|
|
53
|
+
fire_and_forget_send_to_agent(
|
|
54
|
+
sender_agent=self,
|
|
55
|
+
messages=messages,
|
|
56
|
+
other_agent_id=other_agent_id,
|
|
57
|
+
log_prefix="[send_message_to_agent_async]",
|
|
58
|
+
use_retries=False, # or True if you want to use async_send_message_with_retries
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
# Immediately return to caller
|
|
62
|
+
return "Successfully sent message"
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
def send_message_to_agents_matching_all_tags(self: "Agent", message: str, tags: List[str]) -> List[str]:
|
|
66
|
+
"""
|
|
67
|
+
Sends a message to all agents within the same organization that match all of the specified tags. Messages are dispatched in parallel for improved performance, with retries to handle transient issues and timeouts to ensure responsiveness. This function enforces a limit of 100 agents and does not support pagination (cursor-based queries). Each agent must match all specified tags (`match_all_tags=True`) to be included.
|
|
68
|
+
|
|
69
|
+
Args:
|
|
70
|
+
message (str): The content of the message to be sent to each matching agent.
|
|
71
|
+
tags (List[str]): A list of tags that an agent must possess to receive the message.
|
|
72
|
+
|
|
73
|
+
Returns:
|
|
74
|
+
List[str]: A list of responses from the agents that matched all tags. Each
|
|
75
|
+
response corresponds to a single agent. Agents that do not respond will not
|
|
76
|
+
have an entry in the returned list.
|
|
77
|
+
"""
|
|
78
|
+
|
|
79
|
+
server = get_letta_server()
|
|
80
|
+
|
|
81
|
+
# Retrieve agents that match ALL specified tags
|
|
82
|
+
matching_agents = server.agent_manager.list_agents(actor=self.user, tags=tags, match_all_tags=True, limit=100)
|
|
83
|
+
messages = [MessageCreate(role=MessageRole.user, content=message, name=self.agent_state.name)]
|
|
84
|
+
|
|
85
|
+
async def send_messages_to_all_agents():
|
|
86
|
+
tasks = [
|
|
87
|
+
async_send_message_with_retries(
|
|
88
|
+
server=server,
|
|
89
|
+
sender_agent=self,
|
|
90
|
+
target_agent_id=agent_state.id,
|
|
91
|
+
messages=messages,
|
|
92
|
+
max_retries=MULTI_AGENT_SEND_MESSAGE_MAX_RETRIES,
|
|
93
|
+
timeout=MULTI_AGENT_SEND_MESSAGE_TIMEOUT,
|
|
94
|
+
logging_prefix="[send_message_to_agents_matching_all_tags]",
|
|
95
|
+
)
|
|
96
|
+
for agent_state in matching_agents
|
|
97
|
+
]
|
|
98
|
+
# Run all tasks in parallel
|
|
99
|
+
return await asyncio.gather(*tasks)
|
|
100
|
+
|
|
101
|
+
# Run the async function and return results
|
|
102
|
+
return asyncio.run(send_messages_to_all_agents())
|
|
@@ -122,7 +122,6 @@ def get_json_schema_from_module(module_name: str, function_name: str) -> dict:
|
|
|
122
122
|
generated_schema = generate_schema(attr)
|
|
123
123
|
|
|
124
124
|
return generated_schema
|
|
125
|
-
|
|
126
125
|
except ModuleNotFoundError:
|
|
127
126
|
raise ModuleNotFoundError(f"Module '{module_name}' not found.")
|
|
128
127
|
except AttributeError:
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
+
import asyncio
|
|
1
2
|
import json
|
|
2
|
-
|
|
3
|
+
import threading
|
|
4
|
+
from random import uniform
|
|
5
|
+
from typing import Any, List, Optional, Union
|
|
3
6
|
|
|
4
7
|
import humps
|
|
5
8
|
from composio.constants import DEFAULT_ENTITY_ID
|
|
6
9
|
from pydantic import BaseModel
|
|
7
10
|
|
|
8
|
-
from letta.constants import
|
|
9
|
-
|
|
11
|
+
from letta.constants import (
|
|
12
|
+
COMPOSIO_ENTITY_ENV_VAR_KEY,
|
|
13
|
+
DEFAULT_MESSAGE_TOOL,
|
|
14
|
+
DEFAULT_MESSAGE_TOOL_KWARG,
|
|
15
|
+
MULTI_AGENT_SEND_MESSAGE_MAX_RETRIES,
|
|
16
|
+
MULTI_AGENT_SEND_MESSAGE_TIMEOUT,
|
|
17
|
+
)
|
|
18
|
+
from letta.orm.errors import NoResultFound
|
|
10
19
|
from letta.schemas.letta_message import AssistantMessage, ReasoningMessage, ToolCallMessage
|
|
11
20
|
from letta.schemas.letta_response import LettaResponse
|
|
12
21
|
from letta.schemas.message import MessageCreate
|
|
22
|
+
from letta.server.rest_api.utils import get_letta_server
|
|
13
23
|
|
|
14
24
|
|
|
15
25
|
# TODO: This is kind of hacky, as this is used to search up the action later on composio's side
|
|
@@ -259,16 +269,63 @@ def parse_letta_response_for_assistant_message(
|
|
|
259
269
|
return None
|
|
260
270
|
|
|
261
271
|
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
272
|
+
def execute_send_message_to_agent(
|
|
273
|
+
sender_agent: "Agent",
|
|
274
|
+
messages: List[MessageCreate],
|
|
275
|
+
other_agent_id: str,
|
|
276
|
+
log_prefix: str,
|
|
277
|
+
) -> Optional[str]:
|
|
278
|
+
"""
|
|
279
|
+
Helper function to send a message to a specific Letta agent.
|
|
280
|
+
|
|
281
|
+
Args:
|
|
282
|
+
sender_agent ("Agent"): The sender agent object.
|
|
283
|
+
message (str): The message to send.
|
|
284
|
+
other_agent_id (str): The identifier of the target Letta agent.
|
|
285
|
+
log_prefix (str): Logging prefix for retries.
|
|
286
|
+
|
|
287
|
+
Returns:
|
|
288
|
+
Optional[str]: The response from the Letta agent if required by the caller.
|
|
289
|
+
"""
|
|
290
|
+
server = get_letta_server()
|
|
291
|
+
|
|
292
|
+
# Ensure the target agent is in the same org
|
|
293
|
+
try:
|
|
294
|
+
server.agent_manager.get_agent_by_id(agent_id=other_agent_id, actor=sender_agent.user)
|
|
295
|
+
except NoResultFound:
|
|
296
|
+
raise ValueError(
|
|
297
|
+
f"The passed-in agent_id {other_agent_id} either does not exist, "
|
|
298
|
+
f"or does not belong to the same org ({sender_agent.user.organization_id})."
|
|
299
|
+
)
|
|
300
|
+
|
|
301
|
+
# Async logic to send a message with retries and timeout
|
|
302
|
+
async def async_send():
|
|
303
|
+
return await async_send_message_with_retries(
|
|
304
|
+
server=server,
|
|
305
|
+
sender_agent=sender_agent,
|
|
306
|
+
target_agent_id=other_agent_id,
|
|
307
|
+
messages=messages,
|
|
308
|
+
max_retries=MULTI_AGENT_SEND_MESSAGE_MAX_RETRIES,
|
|
309
|
+
timeout=MULTI_AGENT_SEND_MESSAGE_TIMEOUT,
|
|
310
|
+
logging_prefix=log_prefix,
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
# Run in the current event loop or create one if needed
|
|
314
|
+
try:
|
|
315
|
+
return asyncio.run(async_send())
|
|
316
|
+
except RuntimeError:
|
|
317
|
+
loop = asyncio.get_event_loop()
|
|
318
|
+
if loop.is_running():
|
|
319
|
+
return loop.run_until_complete(async_send())
|
|
320
|
+
else:
|
|
321
|
+
raise
|
|
265
322
|
|
|
266
323
|
|
|
267
324
|
async def async_send_message_with_retries(
|
|
268
325
|
server,
|
|
269
326
|
sender_agent: "Agent",
|
|
270
327
|
target_agent_id: str,
|
|
271
|
-
|
|
328
|
+
messages: List[MessageCreate],
|
|
272
329
|
max_retries: int,
|
|
273
330
|
timeout: int,
|
|
274
331
|
logging_prefix: Optional[str] = None,
|
|
@@ -290,7 +347,6 @@ async def async_send_message_with_retries(
|
|
|
290
347
|
logging_prefix = logging_prefix or "[async_send_message_with_retries]"
|
|
291
348
|
for attempt in range(1, max_retries + 1):
|
|
292
349
|
try:
|
|
293
|
-
messages = [MessageCreate(role=MessageRole.user, content=message_text, name=sender_agent.agent_state.name)]
|
|
294
350
|
# Wrap in a timeout
|
|
295
351
|
response = await asyncio.wait_for(
|
|
296
352
|
server.send_message_to_agent(
|
|
@@ -334,4 +390,88 @@ async def async_send_message_with_retries(
|
|
|
334
390
|
await asyncio.sleep(backoff)
|
|
335
391
|
else:
|
|
336
392
|
sender_agent.logger.error(f"{logging_prefix} - Fatal error during agent to agent send_message: {error_msg}")
|
|
337
|
-
|
|
393
|
+
raise Exception(error_msg)
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
def fire_and_forget_send_to_agent(
|
|
397
|
+
sender_agent: "Agent",
|
|
398
|
+
messages: List[MessageCreate],
|
|
399
|
+
other_agent_id: str,
|
|
400
|
+
log_prefix: str,
|
|
401
|
+
use_retries: bool = False,
|
|
402
|
+
) -> None:
|
|
403
|
+
"""
|
|
404
|
+
Fire-and-forget send of messages to a specific agent.
|
|
405
|
+
Returns immediately in the calling thread, never blocks.
|
|
406
|
+
|
|
407
|
+
Args:
|
|
408
|
+
sender_agent (Agent): The sender agent object.
|
|
409
|
+
server: The Letta server instance
|
|
410
|
+
messages (List[MessageCreate]): The messages to send.
|
|
411
|
+
other_agent_id (str): The ID of the target agent.
|
|
412
|
+
log_prefix (str): Prefix for logging.
|
|
413
|
+
use_retries (bool): If True, uses async_send_message_with_retries;
|
|
414
|
+
if False, calls server.send_message_to_agent directly.
|
|
415
|
+
"""
|
|
416
|
+
server = get_letta_server()
|
|
417
|
+
|
|
418
|
+
# 1) Validate the target agent (raises ValueError if not in same org)
|
|
419
|
+
try:
|
|
420
|
+
server.agent_manager.get_agent_by_id(agent_id=other_agent_id, actor=sender_agent.user)
|
|
421
|
+
except NoResultFound:
|
|
422
|
+
raise ValueError(
|
|
423
|
+
f"The passed-in agent_id {other_agent_id} either does not exist, "
|
|
424
|
+
f"or does not belong to the same org ({sender_agent.user.organization_id})."
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
# 2) Define the async coroutine to run
|
|
428
|
+
async def background_task():
|
|
429
|
+
try:
|
|
430
|
+
if use_retries:
|
|
431
|
+
result = await async_send_message_with_retries(
|
|
432
|
+
server=server,
|
|
433
|
+
sender_agent=sender_agent,
|
|
434
|
+
target_agent_id=other_agent_id,
|
|
435
|
+
messages=messages,
|
|
436
|
+
max_retries=MULTI_AGENT_SEND_MESSAGE_MAX_RETRIES,
|
|
437
|
+
timeout=MULTI_AGENT_SEND_MESSAGE_TIMEOUT,
|
|
438
|
+
logging_prefix=log_prefix,
|
|
439
|
+
)
|
|
440
|
+
sender_agent.logger.info(f"{log_prefix} fire-and-forget success with retries: {result}")
|
|
441
|
+
else:
|
|
442
|
+
# Direct call to server.send_message_to_agent, no retry logic
|
|
443
|
+
await server.send_message_to_agent(
|
|
444
|
+
agent_id=other_agent_id,
|
|
445
|
+
actor=sender_agent.user,
|
|
446
|
+
messages=messages,
|
|
447
|
+
stream_steps=False,
|
|
448
|
+
stream_tokens=False,
|
|
449
|
+
use_assistant_message=True,
|
|
450
|
+
assistant_message_tool_name=DEFAULT_MESSAGE_TOOL,
|
|
451
|
+
assistant_message_tool_kwarg=DEFAULT_MESSAGE_TOOL_KWARG,
|
|
452
|
+
)
|
|
453
|
+
sender_agent.logger.info(f"{log_prefix} fire-and-forget success (no retries).")
|
|
454
|
+
except Exception as e:
|
|
455
|
+
sender_agent.logger.error(f"{log_prefix} fire-and-forget send failed: {e}")
|
|
456
|
+
|
|
457
|
+
# 3) Helper to run the coroutine in a brand-new event loop in a separate thread
|
|
458
|
+
def run_in_background_thread(coro):
|
|
459
|
+
def runner():
|
|
460
|
+
loop = asyncio.new_event_loop()
|
|
461
|
+
try:
|
|
462
|
+
asyncio.set_event_loop(loop)
|
|
463
|
+
loop.run_until_complete(coro)
|
|
464
|
+
finally:
|
|
465
|
+
loop.close()
|
|
466
|
+
|
|
467
|
+
thread = threading.Thread(target=runner, daemon=True)
|
|
468
|
+
thread.start()
|
|
469
|
+
|
|
470
|
+
# 4) Try to schedule the coroutine in an existing loop, else spawn a thread
|
|
471
|
+
try:
|
|
472
|
+
loop = asyncio.get_running_loop()
|
|
473
|
+
# If we get here, a loop is running; schedule the coroutine in background
|
|
474
|
+
loop.create_task(background_task())
|
|
475
|
+
except RuntimeError:
|
|
476
|
+
# Means no event loop is running in this thread
|
|
477
|
+
run_in_background_thread(background_task())
|
|
@@ -29,6 +29,7 @@ from letta.schemas.openai.chat_completion_request import ChatCompletionRequest,
|
|
|
29
29
|
from letta.schemas.openai.chat_completion_response import ChatCompletionResponse
|
|
30
30
|
from letta.settings import ModelSettings
|
|
31
31
|
from letta.streaming_interface import AgentChunkStreamingInterface, AgentRefreshStreamingInterface
|
|
32
|
+
from letta.utils import run_async_task
|
|
32
33
|
|
|
33
34
|
LLM_API_PROVIDER_OPTIONS = ["openai", "azure", "anthropic", "google_ai", "cohere", "local", "groq"]
|
|
34
35
|
|
|
@@ -156,21 +157,25 @@ def create(
|
|
|
156
157
|
assert isinstance(stream_interface, AgentChunkStreamingInterface) or isinstance(
|
|
157
158
|
stream_interface, AgentRefreshStreamingInterface
|
|
158
159
|
), type(stream_interface)
|
|
159
|
-
response =
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
160
|
+
response = run_async_task(
|
|
161
|
+
openai_chat_completions_process_stream(
|
|
162
|
+
url=llm_config.model_endpoint,
|
|
163
|
+
api_key=model_settings.openai_api_key,
|
|
164
|
+
chat_completion_request=data,
|
|
165
|
+
stream_interface=stream_interface,
|
|
166
|
+
)
|
|
164
167
|
)
|
|
165
168
|
else: # Client did not request token streaming (expect a blocking backend response)
|
|
166
169
|
data.stream = False
|
|
167
170
|
if isinstance(stream_interface, AgentChunkStreamingInterface):
|
|
168
171
|
stream_interface.stream_start()
|
|
169
172
|
try:
|
|
170
|
-
response =
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
response = run_async_task(
|
|
174
|
+
openai_chat_completions_request(
|
|
175
|
+
url=llm_config.model_endpoint,
|
|
176
|
+
api_key=model_settings.openai_api_key,
|
|
177
|
+
chat_completion_request=data,
|
|
178
|
+
)
|
|
174
179
|
)
|
|
175
180
|
finally:
|
|
176
181
|
if isinstance(stream_interface, AgentChunkStreamingInterface):
|
|
@@ -344,9 +349,12 @@ def create(
|
|
|
344
349
|
stream_interface.stream_start()
|
|
345
350
|
try:
|
|
346
351
|
# groq uses the openai chat completions API, so this component should be reusable
|
|
347
|
-
response =
|
|
348
|
-
|
|
349
|
-
|
|
352
|
+
response = run_async_task(
|
|
353
|
+
openai_chat_completions_request(
|
|
354
|
+
url=llm_config.model_endpoint,
|
|
355
|
+
api_key=model_settings.groq_api_key,
|
|
356
|
+
chat_completion_request=data,
|
|
357
|
+
)
|
|
350
358
|
)
|
|
351
359
|
finally:
|
|
352
360
|
if isinstance(stream_interface, AgentChunkStreamingInterface):
|