letta-nightly 0.4.1.dev20241009104130__py3-none-any.whl → 0.4.1.dev20241011104054__py3-none-any.whl
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/agent_store/db.py +23 -7
- letta/cli/cli.py +27 -3
- letta/cli/cli_config.py +1 -1098
- letta/client/utils.py +7 -2
- letta/constants.py +21 -0
- letta/embeddings.py +3 -0
- letta/interface.py +6 -2
- letta/llm_api/google_ai.py +1 -1
- letta/llm_api/helpers.py +11 -4
- letta/llm_api/llm_api_tools.py +2 -12
- letta/llm_api/openai.py +6 -2
- letta/local_llm/constants.py +3 -0
- letta/providers.py +48 -6
- letta/server/server.py +10 -3
- letta/settings.py +1 -1
- letta/streaming_interface.py +8 -4
- {letta_nightly-0.4.1.dev20241009104130.dist-info → letta_nightly-0.4.1.dev20241011104054.dist-info}/METADATA +1 -1
- {letta_nightly-0.4.1.dev20241009104130.dist-info → letta_nightly-0.4.1.dev20241011104054.dist-info}/RECORD +21 -24
- letta/configs/anthropic.json +0 -13
- letta/configs/letta_hosted.json +0 -11
- letta/configs/openai.json +0 -12
- {letta_nightly-0.4.1.dev20241009104130.dist-info → letta_nightly-0.4.1.dev20241011104054.dist-info}/LICENSE +0 -0
- {letta_nightly-0.4.1.dev20241009104130.dist-info → letta_nightly-0.4.1.dev20241011104054.dist-info}/WHEEL +0 -0
- {letta_nightly-0.4.1.dev20241009104130.dist-info → letta_nightly-0.4.1.dev20241011104054.dist-info}/entry_points.txt +0 -0
letta/client/utils.py
CHANGED
|
@@ -2,6 +2,11 @@ from datetime import datetime
|
|
|
2
2
|
|
|
3
3
|
from IPython.display import HTML, display
|
|
4
4
|
|
|
5
|
+
from letta.local_llm.constants import (
|
|
6
|
+
ASSISTANT_MESSAGE_CLI_SYMBOL,
|
|
7
|
+
INNER_THOUGHTS_CLI_SYMBOL,
|
|
8
|
+
)
|
|
9
|
+
|
|
5
10
|
|
|
6
11
|
def pprint(messages):
|
|
7
12
|
"""Utility function for pretty-printing the output of client.send_message in notebooks"""
|
|
@@ -47,13 +52,13 @@ def pprint(messages):
|
|
|
47
52
|
html_content += f"<p><strong>🛠️ [{date_formatted}] Function Return ({return_status}):</strong></p>"
|
|
48
53
|
html_content += f"<p class='function-return'>{return_string}</p>"
|
|
49
54
|
elif "internal_monologue" in message:
|
|
50
|
-
html_content += f"<p><strong
|
|
55
|
+
html_content += f"<p><strong>{INNER_THOUGHTS_CLI_SYMBOL} [{date_formatted}] Internal Monologue:</strong></p>"
|
|
51
56
|
html_content += f"<p class='internal-monologue'>{message['internal_monologue']}</p>"
|
|
52
57
|
elif "function_call" in message:
|
|
53
58
|
html_content += f"<p><strong>🛠️ [[{date_formatted}] Function Call:</strong></p>"
|
|
54
59
|
html_content += f"<p class='function-call'>{message['function_call']}</p>"
|
|
55
60
|
elif "assistant_message" in message:
|
|
56
|
-
html_content += f"<p><strong
|
|
61
|
+
html_content += f"<p><strong>{ASSISTANT_MESSAGE_CLI_SYMBOL} [{date_formatted}] Assistant Message:</strong></p>"
|
|
57
62
|
html_content += f"<p class='assistant-message'>{message['assistant_message']}</p>"
|
|
58
63
|
html_content += "<br>"
|
|
59
64
|
html_content += "</div>"
|
letta/constants.py
CHANGED
|
@@ -75,6 +75,27 @@ NON_USER_MSG_PREFIX = "[This is an automated system message hidden from the user
|
|
|
75
75
|
LLM_MAX_TOKENS = {
|
|
76
76
|
"DEFAULT": 8192,
|
|
77
77
|
## OpenAI models: https://platform.openai.com/docs/models/overview
|
|
78
|
+
# "o1-preview
|
|
79
|
+
"chatgpt-4o-latest": 128000,
|
|
80
|
+
# "o1-preview-2024-09-12
|
|
81
|
+
"gpt-4o-2024-08-06": 128000,
|
|
82
|
+
"gpt-4-turbo-preview": 128000,
|
|
83
|
+
"gpt-4o": 128000,
|
|
84
|
+
"gpt-3.5-turbo-instruct": 16385,
|
|
85
|
+
"gpt-4-0125-preview": 128000,
|
|
86
|
+
"gpt-3.5-turbo-0125": 16385,
|
|
87
|
+
# "babbage-002": 128000,
|
|
88
|
+
# "davinci-002": 128000,
|
|
89
|
+
"gpt-4-turbo-2024-04-09": 128000,
|
|
90
|
+
# "gpt-4o-realtime-preview-2024-10-01
|
|
91
|
+
"gpt-4-turbo": 8192,
|
|
92
|
+
"gpt-4o-2024-05-13": 128000,
|
|
93
|
+
# "o1-mini
|
|
94
|
+
# "o1-mini-2024-09-12
|
|
95
|
+
# "gpt-3.5-turbo-instruct-0914
|
|
96
|
+
"gpt-4o-mini": 128000,
|
|
97
|
+
# "gpt-4o-realtime-preview
|
|
98
|
+
"gpt-4o-mini-2024-07-18": 128000,
|
|
78
99
|
# gpt-4
|
|
79
100
|
"gpt-4-1106-preview": 128000,
|
|
80
101
|
"gpt-4": 8192,
|
letta/embeddings.py
CHANGED
|
@@ -91,6 +91,9 @@ class EmbeddingEndpoint:
|
|
|
91
91
|
raise ValueError(
|
|
92
92
|
f"Embeddings endpoint was provided an invalid URL (set to: '{base_url}'). Make sure embedding_endpoint is set correctly in your Letta config."
|
|
93
93
|
)
|
|
94
|
+
# TODO: find a neater solution - re-mapping for letta endpoint
|
|
95
|
+
if model == "letta-free":
|
|
96
|
+
model = "BAAI/bge-large-en-v1.5"
|
|
94
97
|
self.model_name = model
|
|
95
98
|
self._user = user
|
|
96
99
|
self._base_url = base_url
|
letta/interface.py
CHANGED
|
@@ -5,6 +5,10 @@ from typing import List, Optional
|
|
|
5
5
|
from colorama import Fore, Style, init
|
|
6
6
|
|
|
7
7
|
from letta.constants import CLI_WARNING_PREFIX
|
|
8
|
+
from letta.local_llm.constants import (
|
|
9
|
+
ASSISTANT_MESSAGE_CLI_SYMBOL,
|
|
10
|
+
INNER_THOUGHTS_CLI_SYMBOL,
|
|
11
|
+
)
|
|
8
12
|
from letta.schemas.message import Message
|
|
9
13
|
from letta.utils import json_loads, printd
|
|
10
14
|
|
|
@@ -79,14 +83,14 @@ class CLIInterface(AgentInterface):
|
|
|
79
83
|
@staticmethod
|
|
80
84
|
def internal_monologue(msg: str, msg_obj: Optional[Message] = None):
|
|
81
85
|
# ANSI escape code for italic is '\x1B[3m'
|
|
82
|
-
fstr = f"\x1B[3m{Fore.LIGHTBLACK_EX}
|
|
86
|
+
fstr = f"\x1B[3m{Fore.LIGHTBLACK_EX}{INNER_THOUGHTS_CLI_SYMBOL} {{msg}}{Style.RESET_ALL}"
|
|
83
87
|
if STRIP_UI:
|
|
84
88
|
fstr = "{msg}"
|
|
85
89
|
print(fstr.format(msg=msg))
|
|
86
90
|
|
|
87
91
|
@staticmethod
|
|
88
92
|
def assistant_message(msg: str, msg_obj: Optional[Message] = None):
|
|
89
|
-
fstr = f"{Fore.YELLOW}{Style.BRIGHT}
|
|
93
|
+
fstr = f"{Fore.YELLOW}{Style.BRIGHT}{ASSISTANT_MESSAGE_CLI_SYMBOL} {Fore.YELLOW}{{msg}}{Style.RESET_ALL}"
|
|
90
94
|
if STRIP_UI:
|
|
91
95
|
fstr = "{msg}"
|
|
92
96
|
print(fstr.format(msg=msg))
|
letta/llm_api/google_ai.py
CHANGED
|
@@ -436,7 +436,7 @@ def google_ai_chat_completions_request(
|
|
|
436
436
|
response_json=response_json,
|
|
437
437
|
model=data.get("model"),
|
|
438
438
|
input_messages=data["contents"],
|
|
439
|
-
pull_inner_thoughts_from_args=
|
|
439
|
+
pull_inner_thoughts_from_args=inner_thoughts_in_kwargs,
|
|
440
440
|
)
|
|
441
441
|
except Exception as conversion_error:
|
|
442
442
|
print(f"Error during response conversion: {conversion_error}")
|
letta/llm_api/helpers.py
CHANGED
|
@@ -21,10 +21,17 @@ def make_post_request(url: str, headers: dict[str, str], data: dict[str, Any]) -
|
|
|
21
21
|
# Raise for 4XX/5XX HTTP errors
|
|
22
22
|
response.raise_for_status()
|
|
23
23
|
|
|
24
|
-
#
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
# Check if the response content type indicates JSON and attempt to parse it
|
|
25
|
+
content_type = response.headers.get("Content-Type", "")
|
|
26
|
+
if "application/json" in content_type.lower():
|
|
27
|
+
try:
|
|
28
|
+
response_data = response.json() # Attempt to parse the response as JSON
|
|
29
|
+
printd(f"Response JSON: {response_data}")
|
|
30
|
+
except ValueError as json_err:
|
|
31
|
+
# Handle the case where the content type says JSON but the body is invalid
|
|
32
|
+
error_message = f"Failed to parse JSON despite Content-Type being {content_type}: {json_err}"
|
|
33
|
+
printd(error_message)
|
|
34
|
+
raise ValueError(error_message) from json_err
|
|
28
35
|
else:
|
|
29
36
|
error_message = f"Unexpected content type returned: {response.headers.get('Content-Type')}"
|
|
30
37
|
printd(error_message)
|
letta/llm_api/llm_api_tools.py
CHANGED
|
@@ -217,19 +217,14 @@ def create(
|
|
|
217
217
|
if not use_tool_naming:
|
|
218
218
|
raise NotImplementedError("Only tool calling supported on Google AI API requests")
|
|
219
219
|
|
|
220
|
-
# NOTE: until Google AI supports CoT / text alongside function calls,
|
|
221
|
-
# we need to put it in a kwarg (unless we want to split the message into two)
|
|
222
|
-
google_ai_inner_thoughts_in_kwarg = True
|
|
223
|
-
|
|
224
220
|
if functions is not None:
|
|
225
221
|
tools = [{"type": "function", "function": f} for f in functions]
|
|
226
222
|
tools = [Tool(**t) for t in tools]
|
|
227
|
-
tools = convert_tools_to_google_ai_format(tools, inner_thoughts_in_kwargs=
|
|
223
|
+
tools = convert_tools_to_google_ai_format(tools, inner_thoughts_in_kwargs=True)
|
|
228
224
|
else:
|
|
229
225
|
tools = None
|
|
230
226
|
|
|
231
227
|
return google_ai_chat_completions_request(
|
|
232
|
-
inner_thoughts_in_kwargs=google_ai_inner_thoughts_in_kwarg,
|
|
233
228
|
base_url=llm_config.model_endpoint,
|
|
234
229
|
model=llm_config.model,
|
|
235
230
|
api_key=model_settings.gemini_api_key,
|
|
@@ -238,6 +233,7 @@ def create(
|
|
|
238
233
|
contents=[m.to_google_ai_dict() for m in messages],
|
|
239
234
|
tools=tools,
|
|
240
235
|
),
|
|
236
|
+
inner_thoughts_in_kwargs=True,
|
|
241
237
|
)
|
|
242
238
|
|
|
243
239
|
elif llm_config.model_endpoint_type == "anthropic":
|
|
@@ -246,12 +242,6 @@ def create(
|
|
|
246
242
|
if not use_tool_naming:
|
|
247
243
|
raise NotImplementedError("Only tool calling supported on Anthropic API requests")
|
|
248
244
|
|
|
249
|
-
if functions is not None:
|
|
250
|
-
tools = [{"type": "function", "function": f} for f in functions]
|
|
251
|
-
tools = [Tool(**t) for t in tools]
|
|
252
|
-
else:
|
|
253
|
-
tools = None
|
|
254
|
-
|
|
255
245
|
return anthropic_chat_completions_request(
|
|
256
246
|
url=llm_config.model_endpoint,
|
|
257
247
|
api_key=model_settings.anthropic_api_key,
|
letta/llm_api/openai.py
CHANGED
|
@@ -41,7 +41,9 @@ from letta.utils import smart_urljoin
|
|
|
41
41
|
OPENAI_SSE_DONE = "[DONE]"
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
def openai_get_model_list(
|
|
44
|
+
def openai_get_model_list(
|
|
45
|
+
url: str, api_key: Union[str, None], fix_url: Optional[bool] = False, extra_params: Optional[dict] = None
|
|
46
|
+
) -> dict:
|
|
45
47
|
"""https://platform.openai.com/docs/api-reference/models/list"""
|
|
46
48
|
from letta.utils import printd
|
|
47
49
|
|
|
@@ -60,7 +62,8 @@ def openai_get_model_list(url: str, api_key: Union[str, None], fix_url: Optional
|
|
|
60
62
|
|
|
61
63
|
printd(f"Sending request to {url}")
|
|
62
64
|
try:
|
|
63
|
-
|
|
65
|
+
# TODO add query param "tool" to be true
|
|
66
|
+
response = requests.get(url, headers=headers, params=extra_params)
|
|
64
67
|
response.raise_for_status() # Raises HTTPError for 4XX/5XX status
|
|
65
68
|
response = response.json() # convert to dict from string
|
|
66
69
|
printd(f"response = {response}")
|
|
@@ -145,6 +148,7 @@ def build_openai_chat_completions_request(
|
|
|
145
148
|
import uuid
|
|
146
149
|
|
|
147
150
|
data.user = str(uuid.UUID(int=0))
|
|
151
|
+
data.model = "memgpt-openai"
|
|
148
152
|
|
|
149
153
|
return data
|
|
150
154
|
|
letta/local_llm/constants.py
CHANGED
letta/providers.py
CHANGED
|
@@ -13,7 +13,6 @@ from letta.schemas.llm_config import LLMConfig
|
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
class Provider(BaseModel):
|
|
16
|
-
base_url: str
|
|
17
16
|
|
|
18
17
|
def list_llm_models(self):
|
|
19
18
|
return []
|
|
@@ -25,26 +24,69 @@ class Provider(BaseModel):
|
|
|
25
24
|
pass
|
|
26
25
|
|
|
27
26
|
|
|
27
|
+
class LettaProvider(Provider):
|
|
28
|
+
|
|
29
|
+
name: str = "letta"
|
|
30
|
+
|
|
31
|
+
def list_llm_models(self) -> List[LLMConfig]:
|
|
32
|
+
return [
|
|
33
|
+
LLMConfig(
|
|
34
|
+
model="letta-free", # NOTE: renamed
|
|
35
|
+
model_endpoint_type="openai",
|
|
36
|
+
model_endpoint="https://inference.memgpt.ai",
|
|
37
|
+
context_window=16384,
|
|
38
|
+
)
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
def list_embedding_models(self):
|
|
42
|
+
return [
|
|
43
|
+
EmbeddingConfig(
|
|
44
|
+
embedding_model="letta-free", # NOTE: renamed
|
|
45
|
+
embedding_endpoint_type="hugging-face",
|
|
46
|
+
embedding_endpoint="https://embeddings.memgpt.ai",
|
|
47
|
+
embedding_dim=1024,
|
|
48
|
+
embedding_chunk_size=300,
|
|
49
|
+
)
|
|
50
|
+
]
|
|
51
|
+
|
|
52
|
+
|
|
28
53
|
class OpenAIProvider(Provider):
|
|
29
54
|
name: str = "openai"
|
|
30
55
|
api_key: str = Field(..., description="API key for the OpenAI API.")
|
|
31
|
-
base_url: str = "
|
|
56
|
+
base_url: str = Field(..., description="Base URL for the OpenAI API.")
|
|
32
57
|
|
|
33
58
|
def list_llm_models(self) -> List[LLMConfig]:
|
|
34
59
|
from letta.llm_api.openai import openai_get_model_list
|
|
35
60
|
|
|
36
|
-
|
|
37
|
-
|
|
61
|
+
# Some hardcoded support for OpenRouter (so that we only get models with tool calling support)...
|
|
62
|
+
# See: https://openrouter.ai/docs/requests
|
|
63
|
+
extra_params = {"supported_parameters": "tools"} if "openrouter.ai" in self.base_url else None
|
|
64
|
+
response = openai_get_model_list(self.base_url, api_key=self.api_key, extra_params=extra_params)
|
|
65
|
+
|
|
66
|
+
assert "data" in response, f"OpenAI model query response missing 'data' field: {response}"
|
|
38
67
|
|
|
39
68
|
configs = []
|
|
40
|
-
for
|
|
41
|
-
|
|
69
|
+
for model in response["data"]:
|
|
70
|
+
assert "id" in model, f"OpenAI model missing 'id' field: {model}"
|
|
71
|
+
model_name = model["id"]
|
|
72
|
+
|
|
73
|
+
if "context_length" in model:
|
|
74
|
+
# Context length is returned in OpenRouter as "context_length"
|
|
75
|
+
context_window_size = model["context_length"]
|
|
76
|
+
else:
|
|
77
|
+
context_window_size = self.get_model_context_window_size(model_name)
|
|
42
78
|
|
|
43
79
|
if not context_window_size:
|
|
44
80
|
continue
|
|
45
81
|
configs.append(
|
|
46
82
|
LLMConfig(model=model_name, model_endpoint_type="openai", model_endpoint=self.base_url, context_window=context_window_size)
|
|
47
83
|
)
|
|
84
|
+
|
|
85
|
+
# for OpenAI, sort in reverse order
|
|
86
|
+
if self.base_url == "https://api.openai.com/v1":
|
|
87
|
+
# alphnumeric sort
|
|
88
|
+
configs.sort(key=lambda x: x.model, reverse=True)
|
|
89
|
+
|
|
48
90
|
return configs
|
|
49
91
|
|
|
50
92
|
def list_embedding_models(self) -> List[EmbeddingConfig]:
|
letta/server/server.py
CHANGED
|
@@ -47,8 +47,10 @@ from letta.providers import (
|
|
|
47
47
|
AnthropicProvider,
|
|
48
48
|
AzureProvider,
|
|
49
49
|
GoogleAIProvider,
|
|
50
|
+
LettaProvider,
|
|
50
51
|
OllamaProvider,
|
|
51
52
|
OpenAIProvider,
|
|
53
|
+
Provider,
|
|
52
54
|
VLLMProvider,
|
|
53
55
|
)
|
|
54
56
|
from letta.schemas.agent import AgentState, AgentType, CreateAgent, UpdateAgentState
|
|
@@ -259,10 +261,10 @@ class SyncServer(Server):
|
|
|
259
261
|
# add global default tools (for admin)
|
|
260
262
|
self.add_default_tools(module_name="base")
|
|
261
263
|
|
|
262
|
-
# collect providers
|
|
263
|
-
self._enabled_providers = []
|
|
264
|
+
# collect providers (always has Letta as a default)
|
|
265
|
+
self._enabled_providers: List[Provider] = [LettaProvider()]
|
|
264
266
|
if model_settings.openai_api_key:
|
|
265
|
-
self._enabled_providers.append(OpenAIProvider(api_key=model_settings.openai_api_key))
|
|
267
|
+
self._enabled_providers.append(OpenAIProvider(api_key=model_settings.openai_api_key, base_url=model_settings.openai_api_base))
|
|
266
268
|
if model_settings.anthropic_api_key:
|
|
267
269
|
self._enabled_providers.append(AnthropicProvider(api_key=model_settings.anthropic_api_key))
|
|
268
270
|
if model_settings.ollama_base_url:
|
|
@@ -1622,6 +1624,11 @@ class SyncServer(Server):
|
|
|
1622
1624
|
agent = self._get_or_load_agent(agent_id=agent_id)
|
|
1623
1625
|
archival_memory = agent.persistence_manager.archival_memory
|
|
1624
1626
|
archival_memory.storage.delete({"source_id": source_id})
|
|
1627
|
+
|
|
1628
|
+
# delete agent-source mapping
|
|
1629
|
+
self.ms.detach_source(agent_id=agent_id, source_id=source_id)
|
|
1630
|
+
|
|
1631
|
+
# return back source data
|
|
1625
1632
|
return source
|
|
1626
1633
|
|
|
1627
1634
|
def list_attached_sources(self, agent_id: str) -> List[Source]:
|
letta/settings.py
CHANGED
letta/streaming_interface.py
CHANGED
|
@@ -9,6 +9,10 @@ from rich.live import Live
|
|
|
9
9
|
from rich.markup import escape
|
|
10
10
|
|
|
11
11
|
from letta.interface import CLIInterface
|
|
12
|
+
from letta.local_llm.constants import (
|
|
13
|
+
ASSISTANT_MESSAGE_CLI_SYMBOL,
|
|
14
|
+
INNER_THOUGHTS_CLI_SYMBOL,
|
|
15
|
+
)
|
|
12
16
|
from letta.schemas.message import Message
|
|
13
17
|
from letta.schemas.openai.chat_completion_response import (
|
|
14
18
|
ChatCompletionChunkResponse,
|
|
@@ -296,7 +300,7 @@ class StreamingRefreshCLIInterface(AgentRefreshStreamingInterface):
|
|
|
296
300
|
def process_refresh(self, response: ChatCompletionResponse):
|
|
297
301
|
"""Process the response to rewrite the current output buffer."""
|
|
298
302
|
if not response.choices:
|
|
299
|
-
self.update_output("
|
|
303
|
+
self.update_output(f"{INNER_THOUGHTS_CLI_SYMBOL} [italic]...[/italic]")
|
|
300
304
|
return # Early exit if there are no choices
|
|
301
305
|
|
|
302
306
|
choice = response.choices[0]
|
|
@@ -304,7 +308,7 @@ class StreamingRefreshCLIInterface(AgentRefreshStreamingInterface):
|
|
|
304
308
|
tool_calls = choice.message.tool_calls if choice.message.tool_calls else []
|
|
305
309
|
|
|
306
310
|
if self.fancy:
|
|
307
|
-
message_string = f"
|
|
311
|
+
message_string = f"{INNER_THOUGHTS_CLI_SYMBOL} [italic]{inner_thoughts}[/italic]" if inner_thoughts else ""
|
|
308
312
|
else:
|
|
309
313
|
message_string = "[inner thoughts] " + inner_thoughts if inner_thoughts else ""
|
|
310
314
|
|
|
@@ -326,7 +330,7 @@ class StreamingRefreshCLIInterface(AgentRefreshStreamingInterface):
|
|
|
326
330
|
message = function_args[len(prefix) :]
|
|
327
331
|
else:
|
|
328
332
|
message = function_args
|
|
329
|
-
message_string += f"
|
|
333
|
+
message_string += f"{ASSISTANT_MESSAGE_CLI_SYMBOL} [bold yellow]{message}[/bold yellow]"
|
|
330
334
|
else:
|
|
331
335
|
message_string += f"{function_name}({function_args})"
|
|
332
336
|
|
|
@@ -336,7 +340,7 @@ class StreamingRefreshCLIInterface(AgentRefreshStreamingInterface):
|
|
|
336
340
|
if self.streaming:
|
|
337
341
|
print()
|
|
338
342
|
self.live.start() # Start the Live display context and keep it running
|
|
339
|
-
self.update_output("
|
|
343
|
+
self.update_output(f"{INNER_THOUGHTS_CLI_SYMBOL} [italic]...[/italic]")
|
|
340
344
|
|
|
341
345
|
def stream_end(self):
|
|
342
346
|
if self.streaming:
|
|
@@ -2,29 +2,26 @@ letta/__init__.py,sha256=btKRPdyhkpIyHlCPRLwwz-SCSVcEGNBeheYA-XNesiI,996
|
|
|
2
2
|
letta/__main__.py,sha256=6Hs2PV7EYc5Tid4g4OtcLXhqVHiNYTGzSBdoOnW2HXA,29
|
|
3
3
|
letta/agent.py,sha256=2yYk8H76EYF8-EF5eFqv8dp8avaBcV_hfXOQcwYuAwU,66559
|
|
4
4
|
letta/agent_store/chroma.py,sha256=upR5zGnGs6I6btulEYbiZdGG87BgKjxUJOQZ4Y-RQ_M,12492
|
|
5
|
-
letta/agent_store/db.py,sha256=
|
|
5
|
+
letta/agent_store/db.py,sha256=Hbw4HsxPZSQL9h_3I-SiJRisaYdzk1XSdYJFarjrUtM,22575
|
|
6
6
|
letta/agent_store/lancedb.py,sha256=8RWmqVjowm5g0cc6DNRcb6f1FHGEqFnccnuekhWY39U,5101
|
|
7
7
|
letta/agent_store/milvus.py,sha256=VxEKz9XR7_3QTY59K_38NtJCCQvi41rhHoFibfzW7yw,8469
|
|
8
8
|
letta/agent_store/qdrant.py,sha256=qIEJhXJb6GzcT4wp8iV5Ox5W1CFMvcPViTI4HLSh59E,7879
|
|
9
9
|
letta/agent_store/storage.py,sha256=QWrPdIEJCnsPg1xnPrG1xbOXmbjpz37ZNhvuH52M7A8,6642
|
|
10
10
|
letta/benchmark/benchmark.py,sha256=ebvnwfp3yezaXOQyGXkYCDYpsmre-b9hvNtnyx4xkG0,3701
|
|
11
11
|
letta/benchmark/constants.py,sha256=aXc5gdpMGJT327VuxsT5FngbCK2J41PQYeICBO7g_RE,536
|
|
12
|
-
letta/cli/cli.py,sha256=
|
|
13
|
-
letta/cli/cli_config.py,sha256=
|
|
12
|
+
letta/cli/cli.py,sha256=1r_UlOonkrBXd6SW3KMob6uy4iUnxVs1jQmfKK-ylZw,16912
|
|
13
|
+
letta/cli/cli_config.py,sha256=G7QqPNTtlQ4TdrXZrrFFGblZEhnkyrqN1Cl5z415C-g,8689
|
|
14
14
|
letta/cli/cli_load.py,sha256=aVlGWiNEUs_eG793HLl7cES-dEIuA1CJfZpT1Cm8Uo4,4591
|
|
15
15
|
letta/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
letta/client/admin.py,sha256=itdH1dGL143Je5tkZl8dQ1PavjepClar3QasxpbX1cI,7397
|
|
17
17
|
letta/client/client.py,sha256=bPvSQrbym4xXZu9EfEbX02fpkNVxFBpKoyzK9PFwykE,84515
|
|
18
18
|
letta/client/streaming.py,sha256=bfWlUu7z7EoPfKxBqIarYxGKyrL7Pj79BlliToqcCgI,4592
|
|
19
|
-
letta/client/utils.py,sha256=
|
|
19
|
+
letta/client/utils.py,sha256=AQWl2q11AzSjd1Y7slIENoZ6fO1YW1JSv1qw0fPt57k,2419
|
|
20
20
|
letta/config.py,sha256=j2I90fOh9d9__kOYObwTDLbvVwYR50rIql5nzrvREKg,19161
|
|
21
|
-
letta/
|
|
22
|
-
letta/configs/letta_hosted.json,sha256=pMXFCjX2liBeBY1M2Wgu9GwEicN8tveO1VPoNHpWbRc,365
|
|
23
|
-
letta/configs/openai.json,sha256=z0izsHi7vAj_kJrd3XNgxej61HjPIJobABbhvxL0d8g,373
|
|
24
|
-
letta/constants.py,sha256=VV6T8O4w4ju8q5CrPCbvPwHlUTltkeFji-r7hz8LTIw,5930
|
|
21
|
+
letta/constants.py,sha256=PAvnF4l9hDuWSrPSKVoXhwjWb6V282dI43EOOpKZaFE,6572
|
|
25
22
|
letta/credentials.py,sha256=D9mlcPsdDWlIIXQQD8wSPE9M_QvsRrb0p3LB5i9OF5Q,5806
|
|
26
23
|
letta/data_sources/connectors.py,sha256=E2rJNqVT4WEvxBqOQl0YgNKa_JQXkG0h1luw_XLcTis,10232
|
|
27
|
-
letta/embeddings.py,sha256=
|
|
24
|
+
letta/embeddings.py,sha256=ayAMxW6RUK1RUpLsDiJCG1oY2H6fgricaoqMa4GBjRE,8170
|
|
28
25
|
letta/errors.py,sha256=cDOo4cSYL-LA0w0b0GdsxXd5k2I1LLOY8nhtXk9YqYs,2875
|
|
29
26
|
letta/functions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
30
27
|
letta/functions/function_sets/base.py,sha256=N4QmOjL6gDEyOg67ocF6zVKM-NquTo-yXG_T8r18buA,6440
|
|
@@ -35,20 +32,20 @@ letta/functions/schema_generator.py,sha256=dsVTr9SPyMISU2ZSm1ruStlYnYMnli12dCFuH
|
|
|
35
32
|
letta/humans/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
36
33
|
letta/humans/examples/basic.txt,sha256=Lcp8YESTWvOJgO4Yf_yyQmgo5bKakeB1nIVrwEGG6PA,17
|
|
37
34
|
letta/humans/examples/cs_phd.txt,sha256=9C9ZAV_VuG7GB31ksy3-_NAyk8rjE6YtVOkhp08k1xw,297
|
|
38
|
-
letta/interface.py,sha256=
|
|
35
|
+
letta/interface.py,sha256=QI4hFP0WrNsgM5qX6TbnhH1ZZxsLYr5DaccuxpEQ8S4,12768
|
|
39
36
|
letta/llm_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
40
37
|
letta/llm_api/anthropic.py,sha256=bAb9PVrpYjo2QN51_SJbW7Vry2_Sf55B05UoruHXb7A,12932
|
|
41
38
|
letta/llm_api/azure_openai.py,sha256=8uBQIYa3WpRcxLXgJTYZrl-GhDGflqxXraRLZlpkdh4,4566
|
|
42
39
|
letta/llm_api/azure_openai_constants.py,sha256=oXtKrgBFHf744gyt5l1thILXgyi8NDNUrKEa2GGGpjw,278
|
|
43
40
|
letta/llm_api/cohere.py,sha256=vDRd-SUGp1t_JUIdwC3RkIhwMl0OY7n-tAU9uPORYkY,14826
|
|
44
|
-
letta/llm_api/google_ai.py,sha256=
|
|
45
|
-
letta/llm_api/helpers.py,sha256=
|
|
46
|
-
letta/llm_api/llm_api_tools.py,sha256=
|
|
47
|
-
letta/llm_api/openai.py,sha256=
|
|
41
|
+
letta/llm_api/google_ai.py,sha256=3xZ074nSOCC22c15yerA5ngWzh0ex4wxeI-6faNbHPE,17708
|
|
42
|
+
letta/llm_api/helpers.py,sha256=Qe1YC36QjjOKE-Xh1Ss3dhMNcWergOK_MpG9xdtN9CM,9519
|
|
43
|
+
letta/llm_api/llm_api_tools.py,sha256=8HndYHAH6ENL5vFEYn2px6CjZdx3ttCGxbEtRfK2RAY,15237
|
|
44
|
+
letta/llm_api/openai.py,sha256=gqFIyy7nc254RJddbTs6CXfB_bmABote18KZOePuOdI,21582
|
|
48
45
|
letta/local_llm/README.md,sha256=hFJyw5B0TU2jrh9nb0zGZMgdH-Ei1dSRfhvPQG_NSoU,168
|
|
49
46
|
letta/local_llm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
50
47
|
letta/local_llm/chat_completion_proxy.py,sha256=PXgNveahts5DbZ7GVcPShxmrDKropL81PY2JHc31yAA,13091
|
|
51
|
-
letta/local_llm/constants.py,sha256=
|
|
48
|
+
letta/local_llm/constants.py,sha256=GIu0184EIiOLEqGeupLUYQvkgT_imIjLg3T-KM9TcFM,1125
|
|
52
49
|
letta/local_llm/function_parser.py,sha256=BlNsGo1VzyfY5KdF_RwjRQNOWIsaudo7o37u1W5eg0s,2626
|
|
53
50
|
letta/local_llm/grammars/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
54
51
|
letta/local_llm/grammars/gbnf_grammar_generator.py,sha256=zrATMMTZ3Trhg3egnk7N7p5qwH90hmfT_TVV7tjabGI,56377
|
|
@@ -109,7 +106,7 @@ letta/prompts/system/memgpt_doc.txt,sha256=AsT55NOORoH-K-p0fxklrDRZ3qHs4MIKMuR-M
|
|
|
109
106
|
letta/prompts/system/memgpt_gpt35_extralong.txt,sha256=FheNhYoIzNz6qnJKhVquZVSMj3HduC48reFaX7Pf7ig,5046
|
|
110
107
|
letta/prompts/system/memgpt_intuitive_knowledge.txt,sha256=sA7c3urYqREVnSBI81nTGImXAekqC0Fxc7RojFqud1g,2966
|
|
111
108
|
letta/prompts/system/memgpt_modified_chat.txt,sha256=HOaPVurEftD8KsuwsclDgE2afIfklMjxhuSO96q1-6I,4656
|
|
112
|
-
letta/providers.py,sha256=
|
|
109
|
+
letta/providers.py,sha256=UTgD9VhH0CEszW7sTMvfTnHOpDCd1m1RmgoI6Pr3Vy0,14444
|
|
113
110
|
letta/pytest.ini,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
114
111
|
letta/schemas/agent.py,sha256=ztnUqdhY9V3g0jsbTjF1ypKPC1tZx4QVFaRuLAOXNSA,6230
|
|
115
112
|
letta/schemas/api_key.py,sha256=u07yzzMn-hBAHZIIKbWY16KsgiFjSNR8lAghpMUo3_4,682
|
|
@@ -169,7 +166,7 @@ letta/server/rest_api/routers/v1/tools.py,sha256=MEhxu-zMS2ff_wwcRpMuQyWA71w_3BJ
|
|
|
169
166
|
letta/server/rest_api/routers/v1/users.py,sha256=Y2rDvHOG1B5FLSOjutY3R22vt48IngbZ-9h8CohG5rc,3378
|
|
170
167
|
letta/server/rest_api/static_files.py,sha256=NG8sN4Z5EJ8JVQdj19tkFa9iQ1kBPTab9f_CUxd_u4Q,3143
|
|
171
168
|
letta/server/rest_api/utils.py,sha256=Fc2ZGKzLaBa2sEtSTVjJ8D5M0xIwsWC0CVAOIJaD3rY,2176
|
|
172
|
-
letta/server/server.py,sha256=
|
|
169
|
+
letta/server/server.py,sha256=Vjc6-GdvU5n-VmvFm9rxvD_ahBsz1BYFSbDxOQ9g1JI,82041
|
|
173
170
|
letta/server/startup.sh,sha256=jeGV7B_PS0hS-tT6o6GpACrUbV9WV1NI2L9aLoUDDtc,311
|
|
174
171
|
letta/server/static_files/assets/index-3ab03d5b.css,sha256=OrA9W4iKJ5h2Wlr7GwdAT4wow0CM8hVit1yOxEL49Qw,54295
|
|
175
172
|
letta/server/static_files/assets/index-9a9c449b.js,sha256=qoWUq6_kuLhE9NFkNeCBptgq-oERW46r0tB3JlWe_qc,1818951
|
|
@@ -182,12 +179,12 @@ letta/server/ws_api/example_client.py,sha256=95AA5UFgTlNJ0FUQkLxli8dKNx48MNm3eWG
|
|
|
182
179
|
letta/server/ws_api/interface.py,sha256=TWl9vkcMCnLsUtgsuENZ-ku2oMDA-OUTzLh_yNRoMa4,4120
|
|
183
180
|
letta/server/ws_api/protocol.py,sha256=M_-gM5iuDBwa1cuN2IGNCG5GxMJwU2d3XW93XALv9s8,1821
|
|
184
181
|
letta/server/ws_api/server.py,sha256=C2Kv48PCwl46DQFb0ZP30s86KJLQ6dZk2AhWQEZn9pY,6004
|
|
185
|
-
letta/settings.py,sha256=
|
|
186
|
-
letta/streaming_interface.py,sha256=
|
|
182
|
+
letta/settings.py,sha256=nRtdDiCV-ffIPobpTQMiM50fHRWy0DoX3D1VveaSo_0,2701
|
|
183
|
+
letta/streaming_interface.py,sha256=_FPUWy58j50evHcpXyd7zB1wWqeCc71NCFeWh_TBvnw,15736
|
|
187
184
|
letta/system.py,sha256=buKYPqG5n2x41hVmWpu6JUpyd7vTWED9Km2_M7dLrvk,6960
|
|
188
185
|
letta/utils.py,sha256=neUs7mxNfndzRL5XUxerr8Lic6w7qnyyvf8FBwMnyWw,30852
|
|
189
|
-
letta_nightly-0.4.1.
|
|
190
|
-
letta_nightly-0.4.1.
|
|
191
|
-
letta_nightly-0.4.1.
|
|
192
|
-
letta_nightly-0.4.1.
|
|
193
|
-
letta_nightly-0.4.1.
|
|
186
|
+
letta_nightly-0.4.1.dev20241011104054.dist-info/LICENSE,sha256=mExtuZ_GYJgDEI38GWdiEYZizZS4KkVt2SF1g_GPNhI,10759
|
|
187
|
+
letta_nightly-0.4.1.dev20241011104054.dist-info/METADATA,sha256=fqSS3tY0N8sjslAt2u0MFQv8DPLhVKymVktdjs__DL0,5967
|
|
188
|
+
letta_nightly-0.4.1.dev20241011104054.dist-info/WHEEL,sha256=FMvqSimYX_P7y0a7UY-_Mc83r5zkBZsCYPm7Lr0Bsq4,88
|
|
189
|
+
letta_nightly-0.4.1.dev20241011104054.dist-info/entry_points.txt,sha256=2zdiyGNEZGV5oYBuS-y2nAAgjDgcC9yM_mHJBFSRt5U,40
|
|
190
|
+
letta_nightly-0.4.1.dev20241011104054.dist-info/RECORD,,
|
letta/configs/anthropic.json
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"context_window": 200000,
|
|
3
|
-
"model": "claude-3-opus-20240229",
|
|
4
|
-
"model_endpoint_type": "anthropic",
|
|
5
|
-
"model_endpoint": "https://api.anthropic.com/v1",
|
|
6
|
-
"model_wrapper": null,
|
|
7
|
-
"embedding_endpoint_type": "hugging-face",
|
|
8
|
-
"embedding_endpoint": "https://embeddings.memgpt.ai",
|
|
9
|
-
"embedding_model": "BAAI/bge-large-en-v1.5",
|
|
10
|
-
"embedding_dim": 1024,
|
|
11
|
-
"embedding_chunk_size": 300
|
|
12
|
-
|
|
13
|
-
}
|
letta/configs/letta_hosted.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"context_window": 8192,
|
|
3
|
-
"model_endpoint_type": "openai",
|
|
4
|
-
"model_endpoint": "https://inference.memgpt.ai",
|
|
5
|
-
"model": "memgpt-openai",
|
|
6
|
-
"embedding_endpoint_type": "hugging-face",
|
|
7
|
-
"embedding_endpoint": "https://embeddings.memgpt.ai",
|
|
8
|
-
"embedding_model": "BAAI/bge-large-en-v1.5",
|
|
9
|
-
"embedding_dim": 1024,
|
|
10
|
-
"embedding_chunk_size": 300
|
|
11
|
-
}
|
letta/configs/openai.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"context_window": 8192,
|
|
3
|
-
"model": "gpt-4",
|
|
4
|
-
"model_endpoint_type": "openai",
|
|
5
|
-
"model_endpoint": "https://api.openai.com/v1",
|
|
6
|
-
"model_wrapper": null,
|
|
7
|
-
"embedding_endpoint_type": "openai",
|
|
8
|
-
"embedding_endpoint": "https://api.openai.com/v1",
|
|
9
|
-
"embedding_model": "text-embedding-ada-002",
|
|
10
|
-
"embedding_dim": 1536,
|
|
11
|
-
"embedding_chunk_size": 300
|
|
12
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|