Skip to content

armgit / letta

Public Imported from GitHub
0

Platform for stateful agents: AI with advanced memory that can learn and self-improve over time.

cleanup #326 (#333)

Charles Packer5ac863544631
diff --git a/memgpt/local_llm/chat_completion_proxy.py b/memgpt/local_llm/chat_completion_proxy.py
index 9cfde1ec5..8f5af63f0 100644
--- a/memgpt/local_llm/chat_completion_proxy.py
+++ b/memgpt/local_llm/chat_completion_proxy.py
@@ -28,7 +28,6 @@ def get_chat_completion(
function_call="auto",
):
global has_shown_warning
- grammar = None
grammar_name = None
if HOST is None:
@@ -75,7 +74,7 @@ def get_chat_completion(
else:
llm_wrapper = DEFAULT_WRAPPER()
- if grammar is not None and HOST_TYPE not in ["koboldcpp", "llamacpp", "webui"]:
+ if grammar_name is not None and HOST_TYPE not in ["koboldcpp", "llamacpp", "webui"]:
print(f"Warning: grammars are currently only supported when using llama.cpp as the MemGPT local LLM backend")
# First step: turn the message sequence into a prompt that the model expects