parakeet-nest / parakeet

🦜🪺 Parakeet is a GoLang library, made to simplify the development of small generative AI applications with Ollama 🦙.
https://parakeet-nest.github.io/parakeet/
MIT License
56 stars 4 forks source link

add CreateEmbeddingWithOpenAI #24

Closed codefromthecrypt closed 1 week ago

codefromthecrypt commented 1 week ago

I was able to port my demo code to use completion.ChatWithOpenAI, but then I noticed that CreateEmbedding is similarly using ollama. I would like to be able to OpenAI's embedding for that, even if I'm not using the platform. This allows use in ollama which emulates this, or anything similar that uses llama.cpp like its llama-server or https://github.com/Mozilla-Ocho/llamafile

k33g commented 1 week ago

@codefromthecrypt tested with text-embedding-3-large https://github.com/parakeet-nest/parakeet/blob/main/examples/49-embeddings-memory-openai/main.go

codefromthecrypt commented 1 week ago

verified on my side, too (porting the elastic RAG example). Thanks!