mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-25 04:49:17 +00:00
fmt
This commit is contained in:
@@ -102,6 +102,16 @@ def test_serializable_mapping() -> None:
|
||||
"modifier",
|
||||
"RemoveMessage",
|
||||
),
|
||||
("langchain", "chat_models", "mistralai", "MistralAI"): (
|
||||
"langchain_mistralai",
|
||||
"chat_models",
|
||||
"ChatMistralAI",
|
||||
),
|
||||
("langchain_groq", "chat_models", "ChatGroq"): (
|
||||
"langchain_groq",
|
||||
"chat_models",
|
||||
"ChatGroq",
|
||||
),
|
||||
}
|
||||
serializable_modules = import_all_modules("langchain")
|
||||
|
||||
|
@@ -274,7 +274,7 @@ SERIALIZABLE_MAPPING: Dict[Tuple[str, ...], Tuple[str, ...]] = {
|
||||
("langchain_groq", "chat_models", "ChatGroq"): (
|
||||
"langchain_groq",
|
||||
"chat_models",
|
||||
"ChatGroq"
|
||||
"ChatGroq",
|
||||
),
|
||||
("langchain", "chat_models", "fireworks", "ChatFireworks"): (
|
||||
"langchain_fireworks",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
"""Standard LangChain interface tests"""
|
||||
|
||||
from typing import Type
|
||||
from typing import Tuple, Type
|
||||
|
||||
from langchain_core.language_models import BaseChatModel
|
||||
from langchain_standard_tests.unit_tests import ( # type: ignore[import-not-found]
|
||||
@@ -18,3 +18,7 @@ class TestFireworksStandard(ChatModelUnitTests):
|
||||
@property
|
||||
def chat_model_params(self) -> dict:
|
||||
return {"api_key": "test_api_key"}
|
||||
|
||||
@property
|
||||
def init_from_env_params(self) -> Tuple[dict, dict, dict]:
|
||||
return ({"FIREWORKS_API_KEY": "api_key"}, {}, {"fireworks_api_key": "api_key"})
|
||||
|
@@ -360,7 +360,9 @@ class ChatMistralAI(BaseChatModel):
|
||||
"""A chat model that uses the MistralAI API."""
|
||||
|
||||
client: httpx.Client = Field(default=None, exclude=True) #: :meta private:
|
||||
async_client: httpx.AsyncClient = Field(default=None, exclude=True) #: :meta private:
|
||||
async_client: httpx.AsyncClient = Field(
|
||||
default=None, exclude=True
|
||||
) #: :meta private:
|
||||
mistral_api_key: Optional[SecretStr] = Field(
|
||||
alias="api_key",
|
||||
default_factory=secret_from_env("MISTRAL_API_KEY", default=None),
|
||||
|
@@ -45,6 +45,13 @@
|
||||
'AzureChatOpenAI',
|
||||
]),
|
||||
'kwargs': dict({
|
||||
'azure_ad_token': dict({
|
||||
'id': list([
|
||||
'AZURE_OPENAI_AD_TOKEN',
|
||||
]),
|
||||
'lc': 1,
|
||||
'type': 'secret',
|
||||
}),
|
||||
'azure_endpoint': 'https://test.azure.com',
|
||||
'deployment_name': 'test',
|
||||
'max_retries': 2,
|
||||
|
Reference in New Issue
Block a user