Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Commit

Permalink
Merge pull request #22 from mistralai/bam4d/fetch
Browse files Browse the repository at this point in the history
Bam4d/fetch
  • Loading branch information
Bam4d authored Dec 20, 2023
2 parents e551415 + ab2978e commit c984c0c
Show file tree
Hide file tree
Showing 15 changed files with 29,736 additions and 161 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ env:
browser: true
es2021: true
extends: google
ignorePatterns:
- examples/chat-react/
parserOptions:
ecmaVersion: latest
sourceType: module
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ cd examples
npm install .
```

### API Key Setup

Running the examples requires a Mistral AI API key.

1. Get your own Mistral API Key: <https://docs.mistral.ai/#api-access>
2. Set your Mistral API Key as an environment variable. You only need to do this once.

```bash
# set Mistral API Key (using zsh for example)
$ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv

# reload the environment (or just quit and open a new terminal)
$ source ~/.zshenv
```

You can then run the examples using node:

```bash
Expand Down
23 changes: 23 additions & 0 deletions examples/chat-react/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
32 changes: 32 additions & 0 deletions examples/chat-react/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Mistral AI JS Client Web Demo

A demo of the Mistral AI client being used in a React App.

## Installation

```bash
npm install
```

## Usage

```bash
npm start
```

This will start a web-browser instance.

### API Key Setup

Running the examples requires a Mistral AI API key.

1. Get your own Mistral API Key: <https://docs.mistral.ai/#api-access>
2. Set your Mistral API Key as an environment variable. You only need to do this once.

```bash
# set Mistral API Key (using zsh for example)
$ echo 'export MISTRAL_API_KEY=[your_key_here]' >> ~/.zshenv

# reload the environment (or just quit and open a new terminal)
$ source ~/.zshenv
```
Loading

0 comments on commit c984c0c

Please sign in to comment.