mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-16 08:06:14 +00:00
ollama unit test fixes
This commit is contained in:
parent
7cc104cd12
commit
2dd1988baf
@ -222,19 +222,14 @@ class TestChatOllama(ChatModelV1UnitTests):
|
|||||||
"""`ChatOllama` supports structured output via `with_structured_output`."""
|
"""`ChatOllama` supports structured output via `with_structured_output`."""
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
|
||||||
def supports_image_content_blocks(self) -> bool:
|
|
||||||
"""`ChatOllama` supports image content blocks (e.g., `gemma3`)."""
|
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def supports_reasoning_content_blocks(self) -> bool:
|
def supports_reasoning_content_blocks(self) -> bool:
|
||||||
"""`ChatOllama` supports reasoning/thinking content blocks (e.g., `qwen3`)."""
|
"""`ChatOllama` supports reasoning/thinking content blocks (e.g., `qwen3`)."""
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def returns_usage_metadata(self) -> bool:
|
def supports_image_content_blocks(self) -> bool:
|
||||||
"""`ChatOllama` returns usage metadata with token counts."""
|
"""`ChatOllama` supports image content blocks (e.g., `gemma3`)."""
|
||||||
return True
|
return True
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -403,7 +398,7 @@ class TestChatOllama(ChatModelV1UnitTests):
|
|||||||
def test_validate_model_on_init(
|
def test_validate_model_on_init(
|
||||||
mock_client_class: Any, mock_validate_model: Any
|
mock_client_class: Any, mock_validate_model: Any
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Test that the model is validated on initialization when requested."""
|
"""Test that local model presence is validated on initialization when requested."""
|
||||||
mock_client = MagicMock()
|
mock_client = MagicMock()
|
||||||
mock_client_class.return_value = mock_client
|
mock_client_class.return_value = mock_client
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user