mirror of
https://github.com/Routstr/routstr-core.git
synced 2026-08-09 19:04:47 +00:00
17 lines
350 B
Python
17 lines
350 B
Python
import os
|
|
|
|
from openai import OpenAI
|
|
|
|
client = OpenAI(
|
|
api_key=os.environ.get("TOKEN"),
|
|
base_url=os.environ.get("API_URL", "https://api.routstr.com/v1"),
|
|
)
|
|
|
|
response = client.responses.create(
|
|
model="gpt-5-mini",
|
|
input="What is the latest news about AI?",
|
|
tools=[{"type": "web_search"}], # type: ignore
|
|
)
|
|
|
|
print(response.output)
|