Skip to content

Commit 4c2a274

Browse files
author
Harmanpreet Kaur
committed
made changes
1 parent e7116a1 commit 4c2a274

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/.env.sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AZURE_SEARCH_STRICTNESS=3
1717
AZURE_OPENAI_RESOURCE=
1818
AZURE_OPENAI_MODEL=
1919
AZURE_OPENAI_KEY=
20-
AZURE_OPENAI_MODEL_NAME=gpt-35-turbo-16k
20+
AZURE_OPENAI_MODEL_NAME=gpt-35-turbo
2121
AZURE_OPENAI_TEMPERATURE=0
2222
AZURE_OPENAI_TOP_P=1.0
2323
AZURE_OPENAI_MAX_TOKENS=1000

src/app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def assets(path):
8686
)
8787
AZURE_OPENAI_STREAM = os.environ.get("AZURE_OPENAI_STREAM", "true")
8888
AZURE_OPENAI_MODEL_NAME = os.environ.get(
89-
"AZURE_OPENAI_MODEL_NAME", "gpt-35-turbo-16k"
90-
) # Name of the model, e.g. 'gpt-35-turbo-16k' or 'gpt-4'
89+
"AZURE_OPENAI_MODEL_NAME", "gpt-35-turbo"
90+
) # Name of the model, e.g. 'gpt-35-turbo' or 'gpt-4'
9191
AZURE_OPENAI_EMBEDDING_ENDPOINT = os.environ.get("AZURE_OPENAI_EMBEDDING_ENDPOINT")
9292
AZURE_OPENAI_EMBEDDING_KEY = os.environ.get("AZURE_OPENAI_EMBEDDING_KEY")
9393
AZURE_OPENAI_EMBEDDING_NAME = os.environ.get("AZURE_OPENAI_EMBEDDING_NAME", "")
@@ -108,7 +108,7 @@ def assets(path):
108108
def is_chat_model():
109109
if (
110110
"gpt-4" in AZURE_OPENAI_MODEL_NAME.lower()
111-
or AZURE_OPENAI_MODEL_NAME.lower() in ["gpt-35-turbo-4k", "gpt-35-turbo-16k"]
111+
or AZURE_OPENAI_MODEL_NAME.lower() in ["gpt-35-turbo-4k", "gpt-35-turbo"]
112112
):
113113
return True
114114
return False

src/test_app.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_is_chat_model_with_gpt35_turbo_4k():
4848

4949

5050
def test_is_chat_model_with_gpt35_turbo_16k():
51-
with patch("app.AZURE_OPENAI_MODEL_NAME", "gpt-35-turbo-16k"):
51+
with patch("app.AZURE_OPENAI_MODEL_NAME", "gpt-35-turbo"):
5252
assert is_chat_model() is True
5353

5454

@@ -291,7 +291,7 @@ def test_stream_with_data_azure_success():
291291
with patch("requests.Session.post") as mock_post:
292292
mock_response = MagicMock()
293293
mock_response.iter_lines.return_value = [
294-
b'data: {"id":"1","model":"gpt-35-turbo-16k","created":1736397875,"object":"extensions.chat.completion.chunk","choices":[{"index":0,"delta":{"context":{"messages":[{"role":"tool","content":"hello","end_turn":false}]}},"end_turn":false,"finish_reason":"None"}]}'
294+
b'data: {"id":"1","model":"gpt-35-turbo","created":1736397875,"object":"extensions.chat.completion.chunk","choices":[{"index":0,"delta":{"context":{"messages":[{"role":"tool","content":"hello","end_turn":false}]}},"end_turn":false,"finish_reason":"None"}]}'
295295
]
296296
mock_response.headers = {"apim-request-id": "test-request-id"}
297297
mock_post.return_value.__enter__.return_value = mock_response
@@ -381,7 +381,7 @@ def test_stream_with_data_azure_error():
381381
# body = mock_body
382382
mock_response = MagicMock()
383383
mock_response.iter_lines.return_value = [
384-
b'data: {"id":"1","model":"gpt-35-turbo-16k","created":1736397875,"object":"extensions.chat.completion.chunk","choices":[{"index":0,"delta":{"context":{"messages":[{"role":"tool","content":"hello","end_turn":false}]}},"end_turn":false,"finish_reason":"None"}]}'
384+
b'data: {"id":"1","model":"gpt-35-turbo","created":1736397875,"object":"extensions.chat.completion.chunk","choices":[{"index":0,"delta":{"context":{"messages":[{"role":"tool","content":"hello","end_turn":false}]}},"end_turn":false,"finish_reason":"None"}]}'
385385
]
386386
mock_response.headers = {"apim-request-id": "test-request-id"}
387387
mock_post.return_value.__enter__.return_value = mock_response

0 commit comments

Comments
 (0)