Skip to content

Commit

Permalink
fix: updated hotfix to only regress on specific letta free endpoint, …
Browse files Browse the repository at this point in the history
…otherwise use required
  • Loading branch information
cpacker committed Dec 23, 2024
1 parent ccbc6dd commit 487bb9f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion letta/llm_api/llm_api_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,10 @@ def create(
if function_call is None:
# force function calling for reliability, see https://platform.openai.com/docs/api-reference/chat/create#chat-create-tool_choice
# TODO(matt) move into LLMConfig
function_call = "auto" # TODO change to "required" once proxy supports it
if llm_config.model_endpoint == "https://inference.memgpt.ai":
function_call = "auto" # TODO change to "required" once proxy supports it
else:
function_call = "required"

data = build_openai_chat_completions_request(llm_config, messages, user_id, functions, function_call, use_tool_naming, max_tokens)
if stream: # Client requested token streaming
Expand Down

0 comments on commit 487bb9f

Please sign in to comment.