[chatgpt] Add support for LocalAI and other compatible services (#15385)

* Add support for LocalAI and other compatible services

--------

Signed-off-by: Kai Kreuzer <kai@openhab.org>
This commit is contained in:
Kai Kreuzer
2023-10-17 12:30:52 +02:00
committed by GitHub
parent 062f7b13eb
commit 1fca7bfdc6
6 changed files with 45 additions and 14 deletions

View File

@@ -14,9 +14,13 @@ The binding supports a single thing type `account`, which corresponds to the Ope
The `account` thing requires a single configuration parameter, which is the API key that allows accessing the account.
API keys can be created and managed under <https://platform.openai.com/account/api-keys>.
| Name | Type | Description | Default | Required | Advanced |
|-----------------|---------|-----------------------------------------|---------|----------|----------|
| apiKey | text | The API key to be used for the requests | N/A | yes | no |
| Name | Type | Description | Default | Required | Advanced |
|-----------------|---------|-----------------------------------------------------------|--------------------------------------------|----------|----------|
| apiKey | text | The API key to be used for the requests | N/A | yes | no |
| apiUrl | text | The server API where to reach the AI service | https://api.openai.com/v1/chat/completions | no | yes |
| modelUrl | text | The model url where to retrieve the available models from | https://api.openai.com/v1/models | no | yes |
The advanced parameters `apiUrl` and `modelUrl` can be used, if any other ChatGPT-compatible service is used, e.g. a local installation of [LocalAI](https://github.com/go-skynet/LocalAI).
## Channels