TinyAsyncOpenAIInfinityEmbeddingClient#
- class langchain_community.embeddings.infinity.TinyAsyncOpenAIInfinityEmbeddingClient(host: str = 'http://localhost:7797/v1', aiosession: ClientSession | None = None)[source]#
嵌入Infinity的辅助工具。
它不是Langchain稳定API的一部分,不鼓励直接使用。
示例
mini_client = TinyAsyncInfinityEmbeddingClient( ) embeds = mini_client.embed( model="BAAI/bge-small", text=["doc1", "doc2"] ) # or embeds = await mini_client.aembed( model="BAAI/bge-small", text=["doc1", "doc2"] )
方法
- Parameters:
host (str)
aiosession (ClientSession | None)
- __init__(host: str = 'http://localhost:7797/v1', aiosession: ClientSession | None = None) None [来源]#
- Parameters:
host (str)
aiosession (ClientSession | None)
- Return type:
无