mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 18:50:33 +00:00
- Test if models support forcing tool calls via `tool_choice`. If they do, they should support - `"any"` to specify any tool - the tool name as a string to force calling a particular tool - Add `tool_choice` to signature of `BaseChatModel.bind_tools` in core - Deprecate `tool_choice_value` in standard tests in favor of a boolean `has_tool_choice` Will follow up with PRs in external repos (tested in AWS and Google already).
25 lines
674 B
Python
25 lines
674 B
Python
"""Standard LangChain interface tests"""
|
|
|
|
from typing import Type
|
|
|
|
from langchain_core.language_models import BaseChatModel
|
|
from langchain_tests.integration_tests import ( # type: ignore[import-not-found]
|
|
ChatModelIntegrationTests, # type: ignore[import-not-found]
|
|
)
|
|
|
|
from langchain_mistralai import ChatMistralAI
|
|
|
|
|
|
class TestMistralStandard(ChatModelIntegrationTests):
|
|
@property
|
|
def chat_model_class(self) -> Type[BaseChatModel]:
|
|
return ChatMistralAI
|
|
|
|
@property
|
|
def chat_model_params(self) -> dict:
|
|
return {"model": "mistral-large-latest", "temperature": 0}
|
|
|
|
@property
|
|
def supports_json_mode(self) -> bool:
|
|
return True
|