summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--continuedev/src/continuedev/libs/llm/openai.py2
-rw-r--r--docs/docs/customization.md2
2 files changed, 3 insertions, 1 deletions
diff --git a/continuedev/src/continuedev/libs/llm/openai.py b/continuedev/src/continuedev/libs/llm/openai.py
index 48e773a3..ea77397f 100644
--- a/continuedev/src/continuedev/libs/llm/openai.py
+++ b/continuedev/src/continuedev/libs/llm/openai.py
@@ -166,6 +166,8 @@ class OpenAI(LLM):
messages=messages,
**args,
):
+ if len(chunk.choices) == 0:
+ continue
yield chunk.choices[0].delta
if "content" in chunk.choices[0].delta:
completion += chunk.choices[0].delta.content
diff --git a/docs/docs/customization.md b/docs/docs/customization.md
index a1a9111e..3240c185 100644
--- a/docs/docs/customization.md
+++ b/docs/docs/customization.md
@@ -156,7 +156,7 @@ config = ContinueConfig(
default=OpenAI(api_key="my-api-key", model="gpt-3.5-turbo", openai_server_info=OpenAIServerInfo(
api_base="https://my-azure-openai-instance.openai.azure.com/",
engine="my-azure-openai-deployment",
- api_version="2023-03-15-preview", # NOTE: It is recommended not to change api_version. Newer versions may not work correctly.
+ api_version="2023-03-15-preview",
api_type="azure"
))
)