-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Labels
Description
How are you running AnythingLLM?
Docker (local)
What happened?
The Agent query and response history from the 'default' thread spill over into newly created threads.
Steps:
- Do an agent based web-search query in the default thread of your workspace.
- Close the agent session
- Open new thread
- Do a new agent call in this thread that has no previous messages in it
- See a response that is referring to info from the previous thread
logs of first message in new thread look normal:
[2024-05-10 23:01:08.203] [INFO] Received POST request to /v1/chat/completions with body: {
"model": "lmstudio-community/Meta-Llama-3-8B-Instruct-BPE-fix-GGUF/Meta-Llama-3-8B-Instruct-Q8_0.gguf",
"stream": true,
"messages": [
{
"role": "system",
"content": "You are a smart, precise and helpful AI assistant. Use the provided context to answer the user's questions. Do not make up answers that are not in the context.\n"
},
{
"role": "user",
"content": "This is text in a new thread"
}
],
"temperature": 0.7
}The first agent call does not
[2024-05-10 23:01:27.985] [INFO] Received POST request to /v1/chat/completions with body: {
"model": "lmstudio-community/Meta-Llama-3-8B-Instruct-BPE-fix-GGUF/Meta-Llama-3-8B-Instruct-Q8_0.gguf",
"temperature": 0,
"messages": [
{
"content": "You are a program which picks the most optimal function and parameters to call.\n DO NOT HAVE TO PICK A FUNCTION IF IT WILL NOT HELP ANSWER OR FULFILL THE USER'S QUERY.\n When a function is selection, respond in JSON with no additional text.\n When there is no relevant function to call - return with a regular chat text response.\n Your task is to pick a **single** function that we will use to call, if any seem useful or relevant for the user query.\n\n All JSON responses should have two keys.\n 'name': this is the name of the function name to call. eg: 'web-scraper', 'rag-memory', etc..\n 'arguments': this is an object with the function properties to invoke the function.\n DO NOT INCLUDE ANY OTHER KEYS IN JSON RESPONSES.\n\n Here are the available tools you can use an examples of a query and response so you can understand how each one works.\n -----------\nFunction name: rag-memory\nFunction Description: Search against local documents for context that is relevant to the query or store a snippet of text into memory for retrieval later. Storing information should only be done when the user specifically requests for information to be remembered or saved to long-term memory. You should use this tool before search the internet for information. Do not use this tool unless you are explicity told to 'remember' or 'store' information.\nFunction parameters in JSON format:\n{\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\n \"search\",\n \"store\"\n ],\n \"description\": \"The action we want to take to search for existing similar context or storage of new context.\"\n },\n \"content\": {\n \"type\": \"string\",\n \"description\": \"The plain text to search our local documents with or to store in our vector database.\"\n }\n}\nQuery: \"What is AnythingLLM?\"\nJSON: {\"action\":\"search\",\"content\":\"What is AnythingLLM?\"}\nQuery: \"What do you know about Plato's motives?\"\nJSON: {\"action\":\"search\",\"content\":\"What are the facts about Plato's motives?\"}\nQuery: \"Remember that you are a robot\"\nJSON: {\"action\":\"store\",\"content\":\"I am a robot, the user told me that i am.\"}\nQuery: \"Save that to memory please.\"\nJSON: {\"action\":\"store\",\"content\":\"<insert summary of conversation until now>\"}\n-----------\n-----------\nFunction name: document-summarizer\nFunction Description: Can get the list of files available to search with descriptions and can select a single file to open and summarize.\nFunction parameters in JSON format:\n{\n \"action\": {\n \"type\": \"string\",\n \"enum\": [\n \"list\",\n \"summarize\"\n ],\n \"description\": \"The action to take. 'list' will return all files available with their filename and descriptions. 'summarize' will open and summarize the file by the a document name.\"\n },\n \"document_filename\": {\n \"type\": \"string\",\n \"x-nullable\": true,\n \"description\": \"The file name of the document you want to get the full content of.\"\n }\n}\nQuery: \"Summarize example.txt\"\nJSON: {\"action\":\"summarize\",\"document_filename\":\"example.txt\"}\nQuery: \"What files can you see?\"\nJSON: {\"action\":\"list\",\"document_filename\":null}\nQuery: \"Tell me about readme.md\"\nJSON: {\"action\":\"summarize\",\"document_filename\":\"readme.md\"}\n-----------\n-----------\nFunction name: web-scraping\nFunction Description: Scrapes the content of a webpage or online resource from a provided URL.\nFunction parameters in JSON format:\n{\n \"url\": {\n \"type\": \"string\",\n \"format\": \"uri\",\n \"description\": \"A complete web address URL including protocol. Assumes https if not provided.\"\n }\n}\nQuery: \"What is useanything.com about?\"\nJSON: {\"uri\":\"https://useanything.com\"}\nQuery: \"Scrape https://example.com\"\nJSON: {\"uri\":\"https://example.com\"}\n-----------\n-----------\nFunction name: web-browsing\nFunction Description: Searches for a given query using a search engine to get better results for the user query.\nFunction parameters in JSON format:\n{\n \"query\": {\n \"type\": \"string\",\n \"description\": \"A search query.\"\n }\n}\nQuery: \"Who won the world series today?\"\nJSON: {\"query\":\"Winner of today's world series\"}\nQuery: \"What is AnythingLLM?\"\nJSON: {\"query\":\"AnythingLLM\"}\nQuery: \"Current AAPL stock price\"\nJSON: {\"query\":\"AAPL stock price today\"}\n-----------\n\n\n Now pick a function if there is an appropriate one to use given the last user message and the given conversation so far.",
"role": "system"
},
{
"content": "@agent can you browse the web to tell me when the Eurovision final is broadcasted? ",
"role": "user"
},
{
"content": "Based on the web browsing results, it appears that the Eurovision Song Contest 2024 final is scheduled to take place on Saturday, May 11th, at 8pm. This information is confirmed by multiple sources, including BBC One and BBC iPlayer.\n\nHere are some of the relevant results:\n\n* The official Eurovision website mentions that the Grand Final will take place in Malmö, Sweden, but does not provide a specific date.\n* Radio Times reports that the Eurovision Song Contest final will air on BBC One and BBC iPlayer on Saturday 11th May at 8pm.\n* Wikipedia lists the dates for the Eurovision Song Contest 2023 as two semi-finals on May 9th and 11th, followed by a final on May 13th. However, it's unclear if these dates will be repeated in 2024.\n\nI hope this information is helpful! Let me know if you have any further questions.",
"role": "assistant"
},
{
"content": "@agent this is agent text in a new thread",
"role": "user"
}
]
}Are there known steps to reproduce?
No response