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
text-generation-inference
Commits
faa10ad0
Unverified
Commit
faa10ad0
authored
Nov 21, 2024
by
drbh
Committed by
GitHub
Nov 21, 2024
Browse files
fix: tweak grammar test response (#2769)
parent
8e0c161d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
integration-tests/models/__snapshots__/test_grammar_response_format_llama/test_grammar_response_format_llama_json.json
...format_llama/test_grammar_response_format_llama_json.json
+1
-1
integration-tests/models/test_grammar_response_format_llama.py
...ration-tests/models/test_grammar_response_format_llama.py
+1
-4
No files found.
integration-tests/models/__snapshots__/test_grammar_response_format_llama/test_grammar_response_format_llama_json.json
View file @
faa10ad0
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
"index"
:
0
,
"index"
:
0
,
"logprobs"
:
null
,
"logprobs"
:
null
,
"message"
:
{
"message"
:
{
"content"
:
"{
\n
\"
temperature
\"
: [
\n
35,
\n
34,
\n
36
\n
],
\n
\"
unit
\"
:
\"
°c
\"\n
}"
,
"content"
:
"{
\"
temperature
\"
: [
26, 30, 33, 29 ] ,
\"
unit
\"
:
\"
Fahrenheit
\"
}"
,
"role"
:
"assistant"
"role"
:
"assistant"
}
}
}
}
...
...
integration-tests/models/test_grammar_response_format_llama.py
View file @
faa10ad0
...
@@ -55,10 +55,7 @@ async def test_grammar_response_format_llama_json(llama_grammar, response_snapsh
...
@@ -55,10 +55,7 @@ async def test_grammar_response_format_llama_json(llama_grammar, response_snapsh
called
=
chat_completion
[
"choices"
][
0
][
"message"
][
"content"
]
called
=
chat_completion
[
"choices"
][
0
][
"message"
][
"content"
]
assert
response
.
status_code
==
200
assert
response
.
status_code
==
200
assert
(
assert
called
==
'{ "temperature": [ 26, 30, 33, 29 ] ,"unit": "Fahrenheit" }'
called
==
'{
\n
"temperature": [
\n
35,
\n
34,
\n
36
\n
],
\n
"unit": "°c"
\n
}'
)
assert
chat_completion
==
response_snapshot
assert
chat_completion
==
response_snapshot
...
...
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