Skip to content

Commit

Permalink
Merge pull request #25 from silvanmelchior/bugfix/azure-gpt
Browse files Browse the repository at this point in the history
fix azure integration
  • Loading branch information
silvanmelchior authored Aug 23, 2023
2 parents 8f344bd + d67d4d9 commit 64d0c77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion services/llm/gpt/gpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ def chat(self, history: list[Message]) -> Generator[Response, None, None]:
response = {}
previous_code = None
for chunk_all in chunk_generator:
chunk = chunk_all["choices"][0]["delta"]
if len(chunk_all["choices"]) > 0:
chunk = chunk_all["choices"][0]["delta"]
else:
chunk = {}
fill_dict(response, chunk)

text = None
Expand Down

0 comments on commit 64d0c77

Please sign in to comment.