mirror of
https://github.com/Significant-Gravitas/AutoGPT.git
synced 2026-04-08 03:00:28 -04:00
feat(rnd): Simplify AI block
This commit is contained in:
@@ -52,7 +52,7 @@ class LlmCallBlock(Block):
|
||||
response = openai.chat.completions.create(
|
||||
model=model,
|
||||
messages=prompt, # type: ignore
|
||||
response_format={"type": "json_object"}
|
||||
response_format={"type": "json_object"} if json else {},
|
||||
)
|
||||
return response.choices[0].message.content or ""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user