mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
ollama[minor]: update default method for structured output (#30273)
From function calling to Ollama's [dedicated structured output feature](https://ollama.com/blog/structured-outputs). --------- Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
|
||||
from typing import Type
|
||||
|
||||
import pytest
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_tests.integration_tests import ChatModelIntegrationTests
|
||||
|
||||
from langchain_ollama.chat_models import ChatOllama
|
||||
@@ -25,19 +23,3 @@ class TestChatOllama(ChatModelIntegrationTests):
|
||||
@property
|
||||
def supports_json_mode(self) -> bool:
|
||||
return True
|
||||
|
||||
@pytest.mark.xfail(
|
||||
reason=(
|
||||
"Fails with 'AssertionError'. Ollama does not support 'tool_choice' yet."
|
||||
)
|
||||
)
|
||||
def test_structured_output(self, model: BaseChatModel, schema_type: str) -> None:
|
||||
super().test_structured_output(model, schema_type)
|
||||
|
||||
@pytest.mark.xfail(
|
||||
reason=(
|
||||
"Fails with 'AssertionError'. Ollama does not support 'tool_choice' yet."
|
||||
)
|
||||
)
|
||||
def test_structured_output_pydantic_2_v1(self, model: BaseChatModel) -> None:
|
||||
super().test_structured_output_pydantic_2_v1(model)
|
||||
|
||||
Reference in New Issue
Block a user