Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

fix: Fixed issue #1523 (#1526)

Vinayak Sharmaf14c1b7e5ebb
diff --git a/memgpt/llm_api/azure_openai.py b/memgpt/llm_api/azure_openai.py
index dcf766fd5..293f8183b 100644
--- a/memgpt/llm_api/azure_openai.py
+++ b/memgpt/llm_api/azure_openai.py
@@ -97,6 +97,7 @@ def azure_openai_chat_completions_request(
printd(f"Sending request to {url}")
try:
+ data["messages"] = [i.to_openai_dict() for i in data["messages"]]
response = requests.post(url, headers=headers, json=data)
printd(f"response = {response}")
response.raise_for_status() # Raises HTTPError for 4XX/5XX status
diff --git a/memgpt/server/rest_api/agents/index.py b/memgpt/server/rest_api/agents/index.py
index 73b11e89e..77d574770 100644
--- a/memgpt/server/rest_api/agents/index.py
+++ b/memgpt/server/rest_api/agents/index.py
@@ -71,7 +71,7 @@ def setup_agents_index_router(server: SyncServer, interface: QueuingInterface, p
persona_name = request.config["persona_name"] if "persona_name" in request.config else None
persona = request.config["persona"] if "persona" in request.config else None
request.config["preset"] if ("preset" in request.config and request.config["preset"]) else settings.default_preset
- tool_names = request.config["function_names"]
+ tool_names = request.config["function_names"] if ("function_names" in request.config and request.config["function_names"]) else None
metadata = request.config["metadata"] if "metadata" in request.config else {}
metadata["human"] = human_name
metadata["persona"] = persona_name
diff --git a/poetry.lock b/poetry.lock
index 965a790a0..2489a2c88 100644
--- a/poetry.lock
+++ b/poetry.lock
@@ -1,4 +1,4 @@
-# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand.
+# This file is automatically @generated by Poetry 1.8. and should not be changed by hand.
[[package]]
name = "aiohttp"
@@ -6341,4 +6341,4 @@ server = ["fastapi", "uvicorn", "websockets"]
[metadata]
lock-version = "2.0"
python-versions = "<3.13,>=3.10"
-content-hash = "904e243813980d61b67db2d1dc96cc782299bcdfb80bb122e4f2013f11f2a9c4"
+content-hash = "0522ceb628efd51c0679f3fe8b6da161c5a25a50166f81e58f1be76d0120524c"
diff --git a/pyproject.toml b/pyproject.toml
index 28689b59f..bbeb1f6a2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -76,6 +76,9 @@ autogen = ["pyautogen"]
qdrant = ["qdrant-client"]
ollama = ["llama-index-embeddings-ollama"]
+[tool.poetry.group.dev.dependencies]
+black = "^24.4.2"
+
[tool.black]
line-length = 140
target-version = ['py310', 'py311']