Skip to content

Commit

Permalink
chore: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
gtokman committed Nov 3, 2023
1 parent 08703d2 commit e38c0bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Requires `iOS 15+` and Android `minSdkVersion = 24`.
yarn add react-native-openai
```

## Basic Usage
### Basic Usage

```js
import OpenAI from 'react-native-openai';
Expand All @@ -55,9 +55,7 @@ const openAI = new OpenAI({
organization: 'YOUR_ORGANIZATION',
});

// Alternatively (recommended), you can use your own backend and not hardcode an API key in your app
// pathPrefix is currently not supported on Android, so follow OpenAIs schema for your backend
// i.e. https://my-custom-domain.com/v1/chat/completions
// Alternatively (recommended), you can use your own backend and not hardcode an API key in your app i.e. https://my-custom-domain.com/v1/chat/completions (follow the same API as OpenAI until pathPrefix is fixed on Android)
const openAI = new OpenAI({
host: 'my-custom-host.com',
});
Expand Down

0 comments on commit e38c0bf

Please sign in to comment.