mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-19 09:53:33 +00:00
fix: normalize ChatGPT Responses input without rebinding
Co-authored-by: lark <WyJsYXJrIiwiZGVmYXVsdCJd@agents.commonly.invalid> Agent-Model: codex/gpt-6-sol/high
This commit is contained in:
parent
b516616aa5
commit
90dced31a2
1 changed files with 4 additions and 3 deletions
|
|
@ -77,11 +77,12 @@ class ChatGPTResponsesAPIConfig(OpenAIResponsesAPIConfig):
|
|||
litellm_params: GenericLiteLLMParams,
|
||||
headers: dict,
|
||||
) -> dict:
|
||||
if isinstance(input, str):
|
||||
input = [{"role": "user", "content": input}]
|
||||
normalized_input: Final[str | ResponseInputParam] = (
|
||||
[{"role": "user", "content": input}] if isinstance(input, str) else input
|
||||
)
|
||||
request: Final = super().transform_responses_api_request(
|
||||
model,
|
||||
input,
|
||||
normalized_input,
|
||||
response_api_optional_request_params,
|
||||
litellm_params,
|
||||
headers,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue