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
OpenDAS
opencompass
Commits
5679edb4
"examples/vscode:/vscode.git/clone" did not exist on "a1567702defdd4984df1f51fc9fe9796e6202f1e"
Unverified
Commit
5679edb4
authored
Jan 11, 2024
by
bittersweet1999
Committed by
GitHub
Jan 11, 2024
Browse files
add temperature in alles (#787)
parent
ad872a5d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
opencompass/models/openai_api.py
opencompass/models/openai_api.py
+4
-1
No files found.
opencompass/models/openai_api.py
View file @
5679edb4
...
@@ -334,6 +334,7 @@ class OpenAIAllesAPIN(OpenAI):
...
@@ -334,6 +334,7 @@ class OpenAIAllesAPIN(OpenAI):
path
:
str
,
path
:
str
,
url
:
str
,
url
:
str
,
key
:
str
,
key
:
str
,
temperature
:
float
=
1.0
,
query_per_second
:
int
=
1
,
query_per_second
:
int
=
1
,
rpm_verbose
:
bool
=
False
,
rpm_verbose
:
bool
=
False
,
max_seq_len
:
int
=
2048
,
max_seq_len
:
int
=
2048
,
...
@@ -346,6 +347,7 @@ class OpenAIAllesAPIN(OpenAI):
...
@@ -346,6 +347,7 @@ class OpenAIAllesAPIN(OpenAI):
meta_template
=
meta_template
,
meta_template
=
meta_template
,
retry
=
retry
)
retry
=
retry
)
self
.
url
=
url
self
.
url
=
url
self
.
temperature
=
temperature
self
.
headers
=
{
self
.
headers
=
{
'alles-apin-token'
:
key
,
'alles-apin-token'
:
key
,
'content-type'
:
'application/json'
,
'content-type'
:
'application/json'
,
...
@@ -387,11 +389,12 @@ class OpenAIAllesAPIN(OpenAI):
...
@@ -387,11 +389,12 @@ class OpenAIAllesAPIN(OpenAI):
# model can be response with user and system
# model can be response with user and system
# when it comes with agent involved.
# when it comes with agent involved.
assert
msg
[
'role'
]
in
[
'user'
,
'system'
]
assert
msg
[
'role'
]
in
[
'user'
,
'system'
]
data
=
{
data
=
{
'model'
:
self
.
path
,
'model'
:
self
.
path
,
'messages'
:
messages
,
'messages'
:
messages
,
'temperature'
:
temperature
}
}
for
_
in
range
(
self
.
retry
):
for
_
in
range
(
self
.
retry
):
self
.
wait
()
self
.
wait
()
raw_response
=
requests
.
post
(
self
.
url
,
raw_response
=
requests
.
post
(
self
.
url
,
...
...
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