core[minor], openai[minor], langchain[patch]: BaseLanguageModel.with_structured_output #17302)

```python
class Foo(BaseModel):
  bar: str

structured_llm = ChatOpenAI().with_structured_output(Foo)
```

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Bagatur
2024-02-22 15:33:34 -08:00
committed by GitHub
parent f685d2f50c
commit b5f8cf9509
9 changed files with 448 additions and 68 deletions

View File

@@ -14,6 +14,7 @@ EXPECTED_ALL = [
"SimpleJsonOutputParser",
"XMLOutputParser",
"JsonOutputParser",
"PydanticOutputParser",
]