letta
v0.5.3
主頁// Documentation // Letta Cloud
? LETTA是用於構建狀態LLM應用程序的開源框架。您可以使用LETTA來構建具有高級推理功能和透明的長期記憶的狀態代理。 LETTA框架是白色框和模型不可替代的。
筆記
尋找記憶?你在正確的地方!
Memgpt軟件包和Docker映像已重命名為letta
以闡明Memgpt代理與運行LLM代理作為服務的API服務器 /運行時之間的區別。
您使用LETTA框架來創建模因代理。在此處閱讀有關Memgpt和Letta之間關係的更多信息。
安裝LETTA的兩種主要方法是通過PYPI ( pip
)或Docker :
pip
(下面的指南) - 嘗試LETTA的最簡單方法,默認將使用SQLite和Chromadb用於數據庫後端pip
安裝Letta $ pip install -U letta
$ export OPENAI_API_KEY=sk-...
對於Ollama(有關如何設置各種提供商的示例,請參見我們的完整文檔):
$ export OLLAMA_BASE_URL=http://localhost:11434
您可以通過LETTA CLI工具( letta run
)創建代理並與他們聊天:
$ letta run
? Creating new agent...
? Select LLM model: letta-free [type=openai] [ip=https://inference.memgpt.ai]
? Select embedding model: letta-free [type=hugging-face] [ip=https://embeddings.memgpt.ai]
-> ? Using persona profile: 'sam_pov'
-> ? Using human profile: 'basic'
-> 8 tools: send_message, pause_heartbeats, conversation_search, conversation_search_date, archival_memory_insert, archival_memory_search, core_memory_append, core_memory_replace
? Created new agent 'InspiringSpinach'
Hit enter to begin (will request first Letta message)
? User engaged. Recognize as Chad. Acknowledge presence and establish connection. Explore interests and engage in meaningful discourse.
? Hello, Chad. It's nice to meet you. I am keen on learning and exploring new ideas and concepts. Is there a specific topic you'd like to discuss today?
> Enter your message: my name is Brad, not Chad...
? A discrepancy in identity. Reflect this change in core memory. Apologize for the oversight, and rectify the error.
⚡? [function] updating memory with core_memory_replace
First name: Chad
→ First name: Brad
? Apologize for the mistake in recognizing his name, and begin the conversation anew, addressing him by the correct name this time.
? I apologize for the oversight, Brad. Let's restart. It's a pleasure to meet you, Brad. Is there a specific topic you'd like to discuss today?
> Enter your message:
您可以使用letta server
啟動Letta API服務器(請參閱此處的完整API參考):
$ letta server
Initializing database...
Running: uvicorn server:app --host localhost --port 8283
INFO: Started server process [47750]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://localhost:8283 (Press CTRL+C to quit)
啟動LETTA API服務器時,ADE(代理開發環境)將在http://localhost:8283
:
在Letta中,所有代理都均存儲/持續在同一數據庫中,因此您在CLI中創建的代理可通過API和ADE訪問,反之亦然。在我們的文檔上查看Quickstart指南,以獲取一個教程,您可以在Letta CLI中創建代理,並通過Letta API向同一代理髮消息。
萊塔(Letta)是一個由一百多名貢獻者構建的開源項目。有很多方法可以參與Letta OSS項目!
#support
頻道。法律通知:通過使用LETTA和相關的LETTA服務(例如Letta端點或託管服務),您同意我們的隱私政策和服務條款。