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

XAI EF #50

Open
tazarov opened this issue Oct 12, 2024 · 1 comment
Open

XAI EF #50

tazarov opened this issue Oct 12, 2024 · 1 comment
Assignees
Labels
EF Embedding Function

Comments

@tazarov
Copy link
Contributor

tazarov commented Oct 12, 2024

import asyncio
import xai_sdk

async def main():
    client = xai_sdk.Client(api_key="YOUR_API_KEY", api_host="api.x.ai")
    prompts = [
        "This is a crazy promotion for a new product.",
        "This is not a crazy promotion"
    ]
    async for embedding in client.embedder.embed(texts=prompts, model_name="spam"):
        print(embedding)

asyncio.run(main())
@tazarov tazarov added the EF Embedding Function label Oct 12, 2024
@tazarov tazarov self-assigned this Oct 12, 2024
@tazarov
Copy link
Contributor Author

tazarov commented Oct 12, 2024

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

No branches or pull requests

1 participant