diff --git a/.npmrc b/.npmrc index 73fcbbc..1f0f6fc 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ # when we run npm version, we don't want to create a git tag git-tag-version=false +package-lock=true diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..2623462 --- /dev/null +++ b/NOTICE @@ -0,0 +1,13 @@ + Copyright 2024 Platformatic + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md index 0bd3439..fdf7d71 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ This javascript client is inspired from [cohere-typescript](https://github.com/cohere-ai/cohere-typescript) +Forked from https://github.com/mistralai/client-js because the original monkey-patched `fetch()`. # Mistral Javascript Client @@ -8,14 +9,14 @@ You can use the Mistral Javascript client to interact with the Mistral AI API. You can install the library in your project using: -`npm install @mistralai/mistralai` +`npm install @platformatic/mistral-client` ## Usage ### Set up ```typescript -import MistralClient from '@mistralai/mistralai'; +import MistralClient from '@platformatic/mistral-client'; const apiKey = process.env.MISTRAL_API_KEY || 'your_api_key'; @@ -117,7 +118,7 @@ node chat_with_streaming.js After the env variable setup the client will find the `MISTRAL_API_KEY` by itself ```typescript -import MistralClient from '@mistralai/mistralai'; +import MistralClient from '@platformatic/mistral-client'; const client = new MistralClient(); ``` diff --git a/package-lock.json b/package-lock.json index ccd3293..fa398bf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { - "name": "@mistralai/mistralai", + "name": "@platformatic/mistral-client", "version": "0.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { - "name": "@mistralai/mistralai", + "name": "@platformatic/mistral-client", "version": "0.0.1", - "license": "ISC", + "license": "Apache-2.0", "dependencies": { "node-fetch": "^2.6.7" }, diff --git a/package.json b/package.json index dae5bc3..47988ab 100644 --- a/package.json +++ b/package.json @@ -1,9 +1,9 @@ { - "name": "@mistralai/mistralai", + "name": "@platformatic/mistral-client", "version": "0.0.1", "description": "", "author": "bam4d@mistral.ai", - "license": "ISC", + "license": "Apache-2.0", "type": "module", "main": "src/client.js", "scripts": { @@ -15,7 +15,7 @@ }, "repository": { "type": "git", - "url": "https://github.com/mistralai/client-js" + "url": "https://github.com/platformatic/mistral-client" }, "types": "src/client.d.ts", "dependencies": { diff --git a/src/client.d.ts b/src/client.d.ts index 45adc72..a87d15c 100644 --- a/src/client.d.ts +++ b/src/client.d.ts @@ -1,4 +1,4 @@ -declare module '@mistralai/mistralai' { +declare module '@platformatic/mistral-client' { export interface ModelPermission { id: string; object: 'model_permission';