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 - name: Install
run: | run: |
make install-integration-tests make install-integration-tests
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
- name: Run tests - name: Run tests
run: | run: |
export DOCKER_VOLUME=/mnt/cache export DOCKER_VOLUME=/mnt/cache

View File

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

View File

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