MCPcopy Index your code
hub / github.com/TaskingAI/TaskingAI / update_chat_memory

Function update_chat_memory

backend/app/services/assistant/chat.py:11–28  ·  view source on GitHub ↗

Update the chat memory :param chat: the chat to update :param memory: the chat memory to update :return: the updated chat

(
    chat: Chat,
    memory: ChatMemory,
)

Source from the content-addressed store, hash-verified

9
10
11async def update_chat_memory(
12 chat: Chat,
13 memory: ChatMemory,
14) -> Chat:
15 """
16 Update the chat memory
17 :param chat: the chat to update
18 :param memory: the chat memory to update
19 :return: the updated chat
20 """
21
22 chat = await chat_ops.update(
23 assistant_id=chat.assistant_id,
24 chat_id=chat.chat_id,
25 update_dict={"memory": memory.model_dump()},
26 )
27
28 return chat
29
30
31async def get_chat(

Callers 1

createMethod · 0.90

Calls 2

updateMethod · 0.45
model_dumpMethod · 0.45

Tested by

no test coverage detected