Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.
patch web UI (#484)
Charles Packer8a7a64c7f9a0
diff --git a/memgpt/local_llm/webui/api.py b/memgpt/local_llm/webui/api.pyindex 29a859969..710b31883 100644--- a/memgpt/local_llm/webui/api.py+++ b/memgpt/local_llm/webui/api.py@@ -18,8 +18,9 @@ def get_webui_completion(endpoint, prompt, context_window, settings=SIMPLE, gram# Settings for the generation, includes the prompt + stop tokens, max length, etcrequest = settingsrequest["prompt"] = prompt- request["max_tokens"] = context_window- # request["truncation_length"] = context_window+ request["truncation_length"] = context_window+ request["max_tokens"] = int(context_window - prompt_tokens)+ request["max_new_tokens"] = int(context_window - prompt_tokens) # safety backup to "max_tokens", shouldn't matter# Set grammarif grammar is not None:diff --git a/memgpt/local_llm/webui/settings.py b/memgpt/local_llm/webui/settings.pyindex 806540744..57c775489 100644--- a/memgpt/local_llm/webui/settings.py+++ b/memgpt/local_llm/webui/settings.py@@ -1,7 +1,8 @@from ...constants import LLM_MAX_TOKENSSIMPLE = {- "stopping_strings": [+ # "stopping_strings": [+ "stop": ["\nUSER:","\nASSISTANT:","\nFUNCTION RETURN:",