Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
khanh nguyen
Openai Service
Commits
6c16d772
Commit
6c16d772
authored
Dec 18, 2025
by
server2
Browse files
KHANHNQ: Update model
parent
945f694d
Changes
1
Hide whitespace changes
Inline
Side-by-side
ai_service/openai_handler.py
View file @
6c16d772
...
...
@@ -38,7 +38,7 @@ class OpenAIHandler:
elif
state
==
ProcessingState
.
PROCESSING
:
try
:
response
=
self
.
client
.
chat
.
completions
.
create
(
model
=
"gpt-
4.1-2025-04-14
"
,
model
=
"gpt-
5
"
,
messages
=
[
{
"role"
:
"user"
,
...
...
@@ -140,12 +140,12 @@ class OpenAIHandler:
{
message
}
"""
response
=
self
.
client
.
chat
.
completions
.
create
(
model
=
"gpt-
4.1-mini-2025-04-14
"
,
model
=
"gpt-
5
"
,
messages
=
[
{
"role"
:
"system"
,
"content"
:
"Bạn là bộ lọc thông tin nhạy cảm."
},
{
"role"
:
"user"
,
"content"
:
prompt
}
],
temperature
=
0
#
temperature=0
)
result
=
response
.
choices
[
0
].
message
.
content
.
strip
()
self
.
logger
.
info
(
result
)
...
...
@@ -200,7 +200,7 @@ class OpenAIHandler:
"container"
:
{
"type"
:
"auto"
,
"file_ids"
:
spread_sheet_file_ids
}
# Optional: if using a file
})
stream
=
self
.
client
.
responses
.
create
(
model
=
model
,
model
=
"gpt-5"
,
input
=
input
,
tools
=
tools
,
stream
=
True
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment