😏
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
from typing import Any
|
||||
|
||||
ENDPOINT = "/v1/chat/completions"
|
||||
|
||||
|
||||
def build_request(prompt: str) -> dict[str, Any]:
|
||||
return {
|
||||
"model": "gpt-5",
|
||||
"messages": [{"role": "user", "content": prompt}],
|
||||
}
|
||||
|
||||
|
||||
def extract_text(response: dict[str, Any]) -> str:
|
||||
return str(response["choices"][0]["message"]["content"])
|
||||
Reference in New Issue
Block a user