Skip to content

Commit

Permalink
Add custom LLM info
Browse files Browse the repository at this point in the history
  • Loading branch information
murdercode committed Mar 28, 2024
1 parent cd26367 commit 220c2f9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,15 @@ If you are using our [TinyMCE Laravel Nova Package 4](https://github.com/murderc
- We are using the new `/chat/completions` endpoint from OpenAI
- The `model` default now must be a chat model, like `gpt-3.5-turbo`
- If you want to use the old `/completion` endpoint, you can use the `baseUri` option to set your custom LLM endpoint like `https://api.openai.com/v1/completions`

### Custom LLM

If you have a custom LLM, you can use it by setting the `baseUri` option in the configuration. The plugin will use this endpoint to generate the text.

```js
baseUri: "https://your-llm-endpoint.com"
```

Please note that the custom LLM must be OpenAI compatible and follow the same API as OpenAI.
Also, the custom LLM must be accessible from the client-side.
Check the `demo-lm-studio.html` file for an example of how to use a custom LLM.
4 changes: 2 additions & 2 deletions demo/index.html → demo/demo-lm-studio.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@

// 2. Configure the ChatGPT plugin
openai: {
api_key: "sk-", // Your OpenAI API key
model: "gpt-3.5-turbo",
api_key: "lm-studio",
// model: "",
temperature: 0.5,
max_tokens: 150,
prompts: [
Expand Down

0 comments on commit 220c2f9

Please sign in to comment.