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

CDN-hosted version of the mistralai JS SDK? #45

Open
maudnals opened this issue Jan 26, 2024 · 1 comment
Open

CDN-hosted version of the mistralai JS SDK? #45

maudnals opened this issue Jan 26, 2024 · 1 comment

Comments

@maudnals
Copy link

maudnals commented Jan 26, 2024

Hi folks!
For quick frontend-only experimentation purposes, it would be handy to be able to write code like this:

<script type="importmap">
  {
    "imports": {
      "@mistralai/mistralai": "https://{$CDN_HOSTED_LIB_URL}"
    }
  }
</script>
<script type="module">
  import MistralClient from '@mistralai/mistralai';
  const client = new MistralClient($API_KEY);
  // const chatResponseGen = await client.chat({ ... etc
</script>

It would require a CDN-hosted version of @mistralai/mistralai.
Is it an option for you to support something like this?

Note: No server / node component here, so the API key lives in the frontend. Arguably OK for quick local experimentation purposes.

@Achintharya
Copy link

you can use skypackcdn to import from, that's what I used on my website. It was working perfectly fine until today. The zod version is not updated so it isnt working currently

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

No branches or pull requests

2 participants