How could I create custom embedder? #5310
-
|
I've read through the documentation but didn’t find any info about how to create a custom embedder. For example, I'm using SiliconFlow’s embedding API: curl --request POST \
--url https://api.siliconflow.cn/v1/embeddings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "BAAI/bge-large-zh-v1.5",
"input": "Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out!"
}'Response: {
"model": "<string>",
"data": [
{
"object": "embedding",
"embedding": [
123
],
"index": 123
}
],
"usage": {
"prompt_tokens": 123,
"completion_tokens": 123,
"total_tokens": 123
}
} |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
|
Hey @stimw, |
Beta Was this translation helpful? Give feedback.
-
|
Hey @stimw ! The siliconflow models are OpenAI-compatible. Here's how you can use them: from agno.knowledge.embedder.openai import OpenAIEmbedder |
Beta Was this translation helpful? Give feedback.
Hey @stimw ! The siliconflow models are OpenAI-compatible. Here's how you can use them:
from agno.knowledge.embedder.openai import OpenAIEmbedder