diff --git a/README-cn.md b/README-cn.md index f10c4c6..4812b53 100644 --- a/README-cn.md +++ b/README-cn.md @@ -1,8 +1,8 @@ # Aoi (葵) -由 ChatGPT 驱动的 Ghost in the Shell +由 OpenAI 驱动的 Ghost in the Shell -Aoi 是由 ChatGPT 驱动的基于人工智能的对话代理程序。使用 Aoi,可以在终端中与 AI 进行自然语言对话,它能够理解您的查询并执行适当的命令。 +使用 Aoi,可以在终端中与 AI 进行自然语言对话,它能够理解您的查询并执行适当的命令。 ## 功能 Aoi 可以用作 ChatGPT 的终端版本,此外,Aoi 还带有几个内置功能提高使用效率: @@ -21,20 +21,33 @@ Aoi 是由 ChatGPT 驱动的基于人工智能的对话代理程序。使用 Aoi ```bash go install github.com/shellfly/aoi@latest ``` +### OpenAI API Key 将 OpenAI API 密钥设置为环境变量,然后运行 aoi 命令。 ```bash export OPENAI_API_KEY= + aoi ``` + +### OpenAI API Base URL 如有需要,也可自定义 OpenAI API BASE URL 为环境变量。 ```bash - export OPENAI_API_BASE_URL= ``` +### Azure OpenAI +使用Azure的环境变量,并且传递`azure.deployment`参数来使用Azure OpenAI 服务 + +``` +export OPENAI_API_KEY={azure openai secret} +export OPENAI_API_BASE_URL={azure openai endpoint} + +aoi -azure.deployment {model deployment name} +``` + ## 演示 ### shell [![shell](/doc/shell.gif)](https://asciinema.org/a/XjCGaMNf8Qp2nQ1UDlehjm5AN) diff --git a/README.md b/README.md index f85e10f..d7b2401 100644 --- a/README.md +++ b/README.md @@ -3,9 +3,9 @@ [中文说明](/README-cn.md) -Ghost in the Shell powered by ChatGPT +Ghost in the Shell powered by OpenAI. -**Aoi** is an AI-based conversational agent powered by ChatGPT. With Aoi, you can have natural language conversations with an AI in the terminal that can understand your queries and execute appropriate commands. +With Aoi, you can have natural language conversations with an AI in the terminal that can understand your queries and execute appropriate commands. ## Features You can use Aoi as a terminal version of ChatGPT, Besides, Aoi comes with several built-in features that can help you be more productive: @@ -26,17 +26,29 @@ You can download Aoi from the GitHub [release page](https://github.com/shellfly/ go install github.com/shellfly/aoi@latest ``` +### OpenAI API Key Set your OpenAI API key as an environment variable, and then run the `aoi` command. ```bash -export OPENAI_API_KEY= +export OPENAI_API_KEY={your_api_key} + aoi ``` -If necessary, you can also customize the OpenAI API BASE URL as an environment variable. + +### OpenAI API Base URL +If needed, you can also customize the OpenAI API BASE URL as an environment variable. ```bash +export OPENAI_API_BASE_URL={your_custom_api_base_url} +``` + +### Azure OpenAI +Set Azure environment variables and pass the `azure.deployment` to use Azure OpenAI service +``` +export OPENAI_API_KEY={azure openai secret} +export OPENAI_API_BASE_URL={azure openai endpoint} -export OPENAI_API_BASE_URL= +aoi -azure.deployment {model deployment name} ``` ## Demos