mirror of
https://github.com/kennethreitz/instructor.git
synced 2026-06-05 22:50:18 +00:00
Completion create function returns openai completion if there is no function call (#56)
This commit is contained in:
@@ -150,6 +150,7 @@ class ChatCompletion(BaseModel):
|
||||
completion = openai.ChatCompletion.create(**kwargs)
|
||||
if self.function:
|
||||
return self.function.from_response(completion)
|
||||
return completion
|
||||
|
||||
async def acreate(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user