Fingers crossed.

This commit is contained in:
Nicolas Patry 2024-09-11 15:34:59 +02:00
parent 1c3ef1c184
commit 5c0a252e63
No known key found for this signature in database
GPG Key ID: 64AF4752B2967863
3 changed files with 9 additions and 8 deletions

View File

@ -181,8 +181,6 @@ jobs:
- name: Install
run: |
make install-integration-tests
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Run tests
run: |
export DOCKER_VOLUME=/mnt/cache

View File

@ -103,6 +103,9 @@ class ResponseComparator(JSONSnapshotExtension):
def _convert_data(data):
if isinstance(data, Dict):
if "choices" in data:
data["choices"] = list(
sorted(data["choices"], key=lambda x: x["index"])
)
choices = data["choices"]
if isinstance(choices, List) and len(choices) >= 1:
if "delta" in choices[0]:

View File

@ -1,5 +1,11 @@
{
"choices": [
{
"finish_reason": "length",
"index": 0,
"logprobs": null,
"text": " A Beginners Guide\nDeep learning is a subset"
},
{
"finish_reason": "length",
"index": 1,
@ -12,12 +18,6 @@
"logprobs": null,
"text": "usculas_minusculas(s):\n \"\"\"\n"
},
{
"finish_reason": "length",
"index": 0,
"logprobs": null,
"text": " A Beginners Guide\nDeep learning is a subset"
},
{
"finish_reason": "length",
"index": 2,