Skip to content

Commit 645159f

Browse files
authored
update readme with local instructions (#172)
1 parent 694bd72 commit 645159f

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ kubectl krew install kubectl-ai/kubectl-ai
4141

4242
- [OpenAI API key](https://platform.openai.com/overview)
4343
- [Azure OpenAI Service](https://aka.ms/azure-openai) API key and endpoint
44-
- OpenAI API-compatible endpoint (such as [AIKit](https://github.com/sozercan/aikit) or [LocalAI](https://localai.io/))
44+
- [OpenAI API-compatible endpoint](#set-up-a-local-openai-api-compatible-endpoint) (such as [AIKit](https://github.com/sozercan/aikit) or [LocalAI](https://localai.io/))
4545

4646
For OpenAI, Azure OpenAI or OpenAI API compatible endpoint, you can use the following environment variables:
4747

@@ -59,6 +59,19 @@ Azure OpenAI service does not allow certain characters, such as `.`, in the depl
5959
export AZURE_OPENAI_MAP="gpt-3.5-turbo=my-deployment"
6060
```
6161

62+
### Set up a local OpenAI API-compatible endpoint
63+
64+
If you don't have OpenAI API access, you can set up a local OpenAI API-compatible endpoint using [AIKit](https://github.com/sozercan/aikit) on your local machine without any GPUs! For more information, see the [AIKit documentaton](https://sozercan.github.io/aikit/).
65+
66+
```shell
67+
docker run -d --rm -p 8080:8080 ghcr.io/sozercan/llama3.1:8b
68+
export OPENAI_ENDPOINT="http://localhost:8080/v1"
69+
export OPENAI_DEPLOYMENT_NAME="llama-3.1-8b-instruct"
70+
export OPENAI_API_KEY="n/a"
71+
```
72+
73+
After setting up the environment like above, you can use `kubectl-ai` as usual.
74+
6275
### Flags and environment variables
6376

6477
- `--require-confirmation` flag or `REQUIRE_CONFIRMATION` environment varible can be set to prompt the user for confirmation before applying the manifest. Defaults to true.

0 commit comments

Comments
 (0)