feat: move HTML rendering of messages into LettaResponse and update notebook (#1983)
This commit is contained in:
@@ -13,16 +13,6 @@
|
||||
"4. Building agentic RAG with MemGPT "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "f096bd03-9fb7-468f-af3c-24cd9e03108c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from helper import nb_print"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "aad3a8cc-d17a-4da1-b621-ecc93c9e2106",
|
||||
@@ -62,9 +52,10 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from letta.schemas.llm_config import LLMConfig\n",
|
||||
"from letta import LLMConfig, EmbeddingConfig\n",
|
||||
"\n",
|
||||
"client.set_default_llm_config(LLMConfig.default_config(\"gpt-4o-mini\")) "
|
||||
"client.set_default_llm_config(LLMConfig.default_config(\"gpt-4o-mini\")) \n",
|
||||
"client.set_default_embedding_config(EmbeddingConfig.default_config(provider=\"openai\")) "
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -124,7 +115,7 @@
|
||||
" message=\"hello!\", \n",
|
||||
" role=\"user\" \n",
|
||||
")\n",
|
||||
"nb_print(response.messages)"
|
||||
"response"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -257,7 +248,7 @@
|
||||
" message = \"My name is actually Bob\", \n",
|
||||
" role = \"user\"\n",
|
||||
") \n",
|
||||
"nb_print(response.messages)"
|
||||
"response"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -291,7 +282,7 @@
|
||||
" message = \"In the future, never use emojis to communicate\", \n",
|
||||
" role = \"user\"\n",
|
||||
") \n",
|
||||
"nb_print(response.messages)"
|
||||
"response"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -353,7 +344,7 @@
|
||||
" message = \"Save the information that 'bob loves cats' to archival\", \n",
|
||||
" role = \"user\"\n",
|
||||
") \n",
|
||||
"nb_print(response.messages)"
|
||||
"response"
|
||||
]
|
||||
},
|
||||
{
|
||||
@@ -407,15 +398,23 @@
|
||||
" role=\"user\", \n",
|
||||
" message=\"What animals do I like? Search archival.\"\n",
|
||||
")\n",
|
||||
"nb_print(response.messages)"
|
||||
"response"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "adc394c8-1d88-42bf-a6a5-b01f20f78d81",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "letta",
|
||||
"display_name": "letta-main",
|
||||
"language": "python",
|
||||
"name": "letta"
|
||||
"name": "letta-main"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
@@ -427,7 +426,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.12.2"
|
||||
"version": "3.12.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user