Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbit committed Oct 26, 2023
1 parent bc166ba commit 94db8a9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions giskard/llm/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def complete(
max_tokens=max_tokens,
)

function_call = None

if fc := cc.get("function_call"):
try:
function_call = LLMFunctionCall(
Expand All @@ -124,8 +126,6 @@ def complete(
)
except (json.JSONDecodeError, KeyError) as err:
raise LLMGenerationError("Could not parse function call") from err
else:
function_call = None

return LLMOutput(message=cc.content, function_call=function_call)

Expand Down

0 comments on commit 94db8a9

Please sign in to comment.