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
}
} |
Answered by
Mustafa-Esoofally
Dec 1, 2025
Replies: 3 comments
|
Hey @stimw, |
0 replies
|
Hey @stimw ! The siliconflow models are OpenAI-compatible. Here's how you can use them: from agno.knowledge.embedder.openai import OpenAIEmbedder |
0 replies
Answer selected by
Mustafa-Esoofally
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @stimw ! The siliconflow models are OpenAI-compatible. Here's how you can use them:
from agno.knowledge.embedder.openai import OpenAIEmbedder