Skip to content
Discussion options

You must be logged in to vote

Hey @stimw ! The siliconflow models are OpenAI-compatible. Here's how you can use them:

from agno.knowledge.embedder.openai import OpenAIEmbedder

embedder = OpenAIEmbedder(
    id="<Embedding model>,
    dimensions=1024,  # dimensions might need to be updated
    api_key="<API_KEY>",
    base_url="https://api.siliconflow.com/v1", 
)

text = "Silicon flow embedding online: fast, affordable, and high-quality embedding services. come try it out!"

# Test get_embedding
embedding = embedder.get_embedding(text)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
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
Category
Q&A
Labels
None yet
3 participants