(texts: list[str])
| 37 | |
| 38 | # 自定义Embedding模型 配置类OpenAI |
| 39 | async def embedding_func(texts: list[str]) -> np.ndarray: |
| 40 | return await openai_embedding( |
| 41 | texts, |
| 42 | model=OPENAI_EMBEDDING_MODEL, |
| 43 | api_key=OPENAI_CHAT_API_KEY, |
| 44 | base_url=OPENAI_API_BASE, |
| 45 | ) |
| 46 | |
| 47 | |
| 48 | # 定义rag |
nothing calls this directly
no test coverage detected