Skip to content

Commit 76eebf9

Browse files
authored
Merge pull request #16 from Azure-Samples/copilot/fix-streaming-example
Add missing `stream=True` to `chat_history_stream.py`
2 parents 4369699 + 31e97f0 commit 76eebf9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

chat_history_stream.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
model=MODEL_NAME,
4242
messages=messages,
4343
temperature=0.7,
44+
stream=True,
4445
)
4546

4647
print("\nAnswer: ")

spanish/structured_outputs_enum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from enum import Enum
2+
from enum import StrEnum
33

44
import azure.identity
55
import openai
@@ -34,7 +34,7 @@
3434
MODEL_NAME = os.environ["OPENAI_MODEL"]
3535

3636

37-
class DayOfWeek(str, Enum):
37+
class DayOfWeek(StrEnum):
3838
DOMINGO = "Domingo"
3939
LUNES = "Lunes"
4040
MARTES = "Martes"

structured_outputs_enum.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import os
2-
from enum import Enum
2+
from enum import StrEnum
33

44
import azure.identity
55
import openai
@@ -34,7 +34,7 @@
3434
MODEL_NAME = os.environ["OPENAI_MODEL"]
3535

3636

37-
class DayOfWeek(str, Enum):
37+
class DayOfWeek(StrEnum):
3838
SUNDAY = "Sunday"
3939
MONDAY = "Monday"
4040
TUESDAY = "Tuesday"

0 commit comments

Comments
 (0)