Skip to content

Commit

Permalink
docs: udpate readme
Browse files Browse the repository at this point in the history
  • Loading branch information
snowyu committed Sep 25, 2024
1 parent 7d143b6 commit 07e0d50
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 27 deletions.
11 changes: 11 additions & 0 deletions README.cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,17 @@ AI Agent 脚本引擎特点:
* [PPE 的 智能编程指南](./lib/guide/)
* 在项目根目录下运行 `ai run guide --streamEcho line` 来启动指南
* [人工智能终端 shell](https://github.com/offline-ai/ai-shell)
* LLM 推理提供者:
* `llamacpp`: llama.cpp server 作为默认的本地 LLM 提供者. 如果没有提供`provider`,就是`llamacpp`
* `openai`: 也支持 OpenAI兼容 服务 API 提供者.
* `--provider openai://chatgpt-4o-latest --apiKey “sk-XXX”`

注意: OpenAI兼容 服务 API 提供者的限制

1. OpenAI 必须是`gpt-4o` `2024-07-18`之后的大模型才支持(json-schema)。在此之前,仅能保证 `json` 支持,无法保证schema.
2. `siliconflow` 的所有模型只保证json,不保证schema.
* `--provider openai://Qwen/Qwen2.5-Coder-7B-Instruct -u https://api.siliconflow.cn/ --apiKey “sk-XXX” ...`
3. `[[Fruit:|Apple|Banana]]`: 让AI强制单选或多选语法,将失效

### Install

Expand Down
78 changes: 51 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,16 @@ Developing an intelligent application with AI Agent Script Engine involves just
* [AI Guide App For PPE Guide](./lib/guide/) - WIP
* `ai run guide --streamEcho line` in the project root folder to run the guide
* [AI Terminal Shell](https://github.com/offline-ai/ai-shell)
* LLM Inference Providers:
* `llamacpp`: llama.cpp server as the default local LLM provider. If no `provider` is specified, `llamacpp` is used.
* `openai`: Also supports OpenAI-compatible service API providers.
* `--provider openai://chatgpt-4o-latest --apiKey “sk-XXX”`

Note: Limitations of OpenAI-Compatible Service API Providers

1. OpenAI must be a large model (`gpt-4o`) released after `2024-07-18` to support `json-schema`. Before this date, only `json` is guaranteed, not the `json-schema`.
2. All `siliconflow` models only guarantee `json` support, not `json-schema` support.
3. `[[Fruit:|Apple|Banana]]`: Syntax for forcing AI to choose either Apple or Banana will be invalid.

## [PPE CLI Command](./lib/guide/cli.md)

Expand Down Expand Up @@ -171,7 +181,7 @@ $ npm install -g @offline-ai/cli
$ ai COMMAND
running command...
$ ai (--version)
@offline-ai/cli/0.5.6 linux-x64 node-v20.17.0
@offline-ai/cli/0.5.7 linux-x64 node-v20.17.0
$ ai --help [COMMAND]
USAGE
$ ai COMMAND
Expand Down Expand Up @@ -349,31 +359,45 @@ Specific script instruction manual see: [Programmable Prompt Engine Specificatio
# Commands

<!-- commands -->
* [`ai agent`](#ai-agent)
* [`ai autocomplete [SHELL]`](#ai-autocomplete-shell)
* [`ai brain [NAME]`](#ai-brain-name)
* [`ai brain dn [NAME]`](#ai-brain-dn-name)
* [`ai brain down [NAME]`](#ai-brain-down-name)
* [`ai brain download [NAME]`](#ai-brain-download-name)
* [`ai brain list [NAME]`](#ai-brain-list-name)
* [`ai brain refresh`](#ai-brain-refresh)
* [`ai brain search [NAME]`](#ai-brain-search-name)
* [`ai config [ITEM_NAME]`](#ai-config-item_name)
* [`ai config save [DATA]`](#ai-config-save-data)
* [`ai help [COMMAND]`](#ai-help-command)
* [`ai plugins`](#ai-plugins)
* [`ai plugins add PLUGIN`](#ai-plugins-add-plugin)
* [`ai plugins:inspect PLUGIN...`](#ai-pluginsinspect-plugin)
* [`ai plugins install PLUGIN`](#ai-plugins-install-plugin)
* [`ai plugins link PATH`](#ai-plugins-link-path)
* [`ai plugins remove [PLUGIN]`](#ai-plugins-remove-plugin)
* [`ai plugins reset`](#ai-plugins-reset)
* [`ai plugins uninstall [PLUGIN]`](#ai-plugins-uninstall-plugin)
* [`ai plugins unlink [PLUGIN]`](#ai-plugins-unlink-plugin)
* [`ai plugins update`](#ai-plugins-update)
* [`ai run [FILE] [DATA]`](#ai-run-file-data)
* [`ai test`](#ai-test)
* [`ai version`](#ai-version)
- [Offline AI PPE CLI(WIP)](#offline-ai-ppe-cliwip)
- [Quick Start](#quick-start)
- [PPE CLI Command](#ppe-cli-command)
- [Programmable Prompt Engine Language](#programmable-prompt-engine-language)
- [I. Core Structure](#i-core-structure)
- [II. Reusability \& Configuration](#ii-reusability--configuration)
- [III. AI Capabilities](#iii-ai-capabilities)
- [IV. Message Text Formatting](#iv-message-text-formatting)
- [V. Script Capabilities](#v-script-capabilities)
- [Install](#install)
- [Run](#run)
- [Usage](#usage)
- [Commands](#commands)
- [`ai agent`](#ai-agent)
- [`ai autocomplete [SHELL]`](#ai-autocomplete-shell)
- [`ai brain [NAME]`](#ai-brain-name)
- [`ai brain dn [NAME]`](#ai-brain-dn-name)
- [`ai brain down [NAME]`](#ai-brain-down-name)
- [`ai brain download [NAME]`](#ai-brain-download-name)
- [`ai brain list [NAME]`](#ai-brain-list-name)
- [`ai brain refresh`](#ai-brain-refresh)
- [`ai brain search [NAME]`](#ai-brain-search-name)
- [`ai config [ITEM_NAME]`](#ai-config-item_name)
- [`ai config save [DATA]`](#ai-config-save-data)
- [`ai help [COMMAND]`](#ai-help-command)
- [`ai plugins`](#ai-plugins)
- [`ai plugins add PLUGIN`](#ai-plugins-add-plugin)
- [`ai plugins:inspect PLUGIN...`](#ai-pluginsinspect-plugin)
- [`ai plugins install PLUGIN`](#ai-plugins-install-plugin)
- [`ai plugins link PATH`](#ai-plugins-link-path)
- [`ai plugins remove [PLUGIN]`](#ai-plugins-remove-plugin)
- [`ai plugins reset`](#ai-plugins-reset)
- [`ai plugins uninstall [PLUGIN]`](#ai-plugins-uninstall-plugin)
- [`ai plugins unlink [PLUGIN]`](#ai-plugins-unlink-plugin)
- [`ai plugins update`](#ai-plugins-update)
- [`ai run [FILE] [DATA]`](#ai-run-file-data)
- [`ai test`](#ai-test)
- [`ai version`](#ai-version)
- [Credit](#credit)

## `ai agent`

Expand Down Expand Up @@ -401,7 +425,7 @@ EXAMPLES
$ ai agent publish <agent-name>
```

_See code: [src/commands/agent/index.ts](https://github.com/offline-ai/cli/blob/v0.5.6/src/commands/agent/index.ts)_
_See code: [src/commands/agent/index.ts](https://github.com/offline-ai/cli/blob/v0.5.7/src/commands/agent/index.ts)_

## `ai autocomplete [SHELL]`

Expand Down

0 comments on commit 07e0d50

Please sign in to comment.