Skip to content

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