Unverified Commit 6cc403e6 authored by Nicolò Lucchesi's avatar Nicolò Lucchesi Committed by GitHub
Browse files

[Bugfix][CI] Fix flaky...


[Bugfix][CI] Fix flaky `entrypoints/openai/test_response_api_with_harmony.py::test_function_calling[openai/gpt-oss-20b]` (#34624)
Signed-off-by: default avatarNickLucche <nlucches@redhat.com>
parent 72d5951d
...@@ -6,7 +6,6 @@ import time ...@@ -6,7 +6,6 @@ import time
import pytest import pytest
import pytest_asyncio import pytest_asyncio
import requests
from openai import BadRequestError, NotFoundError, OpenAI from openai import BadRequestError, NotFoundError, OpenAI
from openai_harmony import ( from openai_harmony import (
Message, Message,
...@@ -513,11 +512,9 @@ async def test_code_interpreter(client: OpenAI, model_name: str): ...@@ -513,11 +512,9 @@ async def test_code_interpreter(client: OpenAI, model_name: str):
def get_weather(latitude, longitude): def get_weather(latitude, longitude):
response = requests.get( # Return a static temperature value to avoid flaky SSL/network errors
f"https://api.open-meteo.com/v1/forecast?latitude={latitude}&longitude={longitude}&current=temperature_2m,wind_speed_10m&hourly=temperature_2m,relative_humidity_2m,wind_speed_10m" # noqa # from calling the external api.open-meteo.com API in CI.
) return 15.0
data = response.json()
return data["current"]["temperature_2m"]
def get_place_to_travel(): def get_place_to_travel():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment