test_embeddings.py — langchain Source File
Architecture documentation for test_embeddings.py, a python file in the langchain codebase. 4 imports, 0 dependents.
Entity Profile
Dependency Diagram
graph LR 6ae76e7f_a6da_fa29_4616_928b462d126c["test_embeddings.py"] 9e98f0a7_ec6e_708f_4f1b_e9428b316e1c["os"] 6ae76e7f_a6da_fa29_4616_928b462d126c --> 9e98f0a7_ec6e_708f_4f1b_e9428b316e1c 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3["typing"] 6ae76e7f_a6da_fa29_4616_928b462d126c --> 8e2034b7_ceb8_963f_29fc_2ea6b50ef9b3 6e58aaea_f08e_c099_3cc7_f9567bfb1ae7["pydantic"] 6ae76e7f_a6da_fa29_4616_928b462d126c --> 6e58aaea_f08e_c099_3cc7_f9567bfb1ae7 7ee113fe_bef7_37b4_1846_b866af39d1c0["langchain_mistralai"] 6ae76e7f_a6da_fa29_4616_928b462d126c --> 7ee113fe_bef7_37b4_1846_b866af39d1c0 style 6ae76e7f_a6da_fa29_4616_928b462d126c fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
import os
from typing import cast
from pydantic import SecretStr
from langchain_mistralai import MistralAIEmbeddings
os.environ["MISTRAL_API_KEY"] = "foo"
def test_mistral_init() -> None:
for model in [
MistralAIEmbeddings(model="mistral-embed", mistral_api_key="test"), # type: ignore[call-arg]
MistralAIEmbeddings(model="mistral-embed", api_key="test"), # type: ignore[arg-type]
]:
assert model.model == "mistral-embed"
assert cast("SecretStr", model.mistral_api_key).get_secret_value() == "test"
Domain
Subdomains
Functions
Dependencies
- langchain_mistralai
- os
- pydantic
- typing
Source
Frequently Asked Questions
What does test_embeddings.py do?
test_embeddings.py is a source file in the langchain codebase, written in python. It belongs to the CoreAbstractions domain, Serialization subdomain.
What functions are defined in test_embeddings.py?
test_embeddings.py defines 1 function(s): test_mistral_init.
What does test_embeddings.py depend on?
test_embeddings.py imports 4 module(s): langchain_mistralai, os, pydantic, typing.
Where is test_embeddings.py in the architecture?
test_embeddings.py is located at libs/partners/mistralai/tests/unit_tests/test_embeddings.py (domain: CoreAbstractions, subdomain: Serialization, directory: libs/partners/mistralai/tests/unit_tests).
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free