Neural-Dragon-AI / Cynde

A Framework For Intelligence Farming
Apache License 2.0
12 stars 0 forks source link

Add llm and embeddings support for together api #4

Open furlat opened 4 months ago

furlat commented 4 months ago

https://www.together.ai/

it should work trivially with the same open ai classes, just need to change endpoint

furlat commented 4 months ago

also mistral https://docs.mistral.ai/

pszemraj commented 4 months ago

as a TODO/additional item: support for voyage

import voyageai

vo = voyageai.Client()
# This will automatically use the environment variable VOYAGE_API_KEY.
# Alternatively, you can use vo = voyageai.Client(api_key="<your secret key>")

texts = [
    "The Mediterranean diet emphasizes fish, olive oil, ...",
    "Photosynthesis in plants converts light energy into ...",
    "20th-century innovations, from radios to smartphones ...",
    "Rivers provide water, irrigation, and habitat for ...",
    "Apple’s conference call to discuss fourth fiscal ...",
    "Shakespeare's works, like 'Hamlet' and ...",
]

# Embed the documents
result = vo.embed(texts, model="voyage-2", input_type="document")
print(result.embeddings)
furlat commented 3 months ago

https://github.com/BerriAI/litellm