mirror of
https://github.com/hwchase17/langchain.git
synced 2025-07-31 08:32:32 +00:00
Community: fix missing f-string modifier in oai structured output parsing error (#29326)
- **Description:** The ValueError raised on certain structured-outputs parsing errors, in langchain openai community integration, was missing a f-string modifier and so didn't produce useful outputs. This is a 2-line, 2-character change. - **Issue:** None open that this fixes - **Dependencies:** Nothing changed - **Twitter handle:** None - [X] **Add tests and docs**: There's nothing to add for. - [-] **Lint and test**: Happy to run this if you deem it necessary. --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
parent
566915d7cf
commit
32c9c58adf
@ -2486,7 +2486,7 @@ def _oai_structured_outputs_parser(ai_msg: AIMessage) -> PydanticBaseModel:
|
||||
else:
|
||||
raise ValueError(
|
||||
"Structured Output response does not have a 'parsed' field nor a 'refusal' "
|
||||
"field. Received message:\n\n{ai_msg}"
|
||||
f"field. Received message:\n\n{ai_msg}"
|
||||
)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user