Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: adds support for the Unify AI #412

Open
wants to merge 53 commits into
base: main
Choose a base branch
from

Conversation

Kacper-W-Kozdon
Copy link

Adds support for the multi-endpoint clients Unify and AsyncUnify of the unify library.

Code preview:

import unify
from semantic_router.llms.unify import UnifyLLM
from semantic_router.schema import Message

endpoints = unify.list_endpoints(api_key="unify-api-key")
messages = [Message(role="user", content="Hello!")]
responses = []

for endpoint in endpoints:
    unify_llm_client = UnifyLLM(unify_api_key="unify-api-key", name=endpoint)
    output = unify_llm_client(messages=messages)
    responses.append(output) 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants