Skip to content

Commit

Permalink
Update function_calling_agent.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Maximilian-Winter committed Jun 23, 2024
1 parent 578a98d commit 2de3961
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/llama_cpp_agent/function_calling_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ def __init__(
self.llama_cpp_tools, self.allow_parallel_function_calling
)
)

self.structured_output_settings.add_thoughts_and_reasoning_field = True
self.without_grammar_mode = False
self.without_grammar_mode_function = []
self.prompt_suffix = ""
Expand Down Expand Up @@ -227,6 +227,9 @@ def generate_response(
structured_output_settings: LlmStructuredOutputSettings = None,
):
self.llama_cpp_agent.add_message(role=Roles.user, message=message)

if structured_output_settings is not None:
structured_output_settings.add_thoughts_and_reasoning_field = True

result = self.intern_get_response(llm_sampling_settings=llm_sampling_settings, structured_output_settings=structured_output_settings)

Expand Down

0 comments on commit 2de3961

Please sign in to comment.