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