Find answers from the community

Home
Members
MoekaChan
M
MoekaChan
Offline, last seen 4 days ago
Joined December 5, 2024
Hi, I have question about chat store. I save the chat store

{"store": {"chat_history": [{"role": "user", "content": "which company create you?", "additional_kwargs": {}}, {"role": "assistant", "content": "I wasn't created by a specific company, but rather I am a product of Meta AI, a subsidiary of Meta Platforms, Inc.", "additional_kwargs": {}}, {"role": "user", "content": "Repeat the question I asked you", "additional_kwargs": {}}, {"role": "assistant", "content": "You asked: "Which company created you?" \n\n\nLet me know if you have any other questions!", "additional_kwargs": {}}]}, "class_name": "SimpleChatStore"}

What is "additional_kwargs" for? I want to let the chat store contains response time, token info, and source node. How to do it? It is possible to add those data into "addtional_kwargs"?

Currently, I am using

self.memory = ChatMemoryBuffer.from_defaults(
token_limit=3000,
chat_store=self.chat_store,
)

self.chat_engine = self.index.as_chat_engine(
chat_mode="context",
llm=self.cur_lm,
memory=self.memory
)
10 comments
M
L
Hi, I have a few questions about using Ollama with llama_index.

If I am currently chatting with llama3.2 using:
llm = Ollama(model="llama3.2:latest")
and I want to switch to phi, should I do:
llm = Ollama(model="phi")?

If I want to continue the conversation with the previous llama3.2 instance after switching to phi, should I create two separate instances—one for llama3.2 and one for phi?

If I want to start a completely new chat with llama3.2, is it necessary to create a new instance for it?

If I have 5 different conversations (possibly using the same or different models), should I create 5 separate instances to manage them?

Thanks in advance for your help!
11 comments
M
L