Skip to content

Commit 384540d

Browse files
authored
Merge pull request #50 from ghost-in-moss/dev
v0.1.0 new beta preparing
2 parents a584517 + 74befb6 commit 384540d

File tree

54 files changed

+464
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+464
-180
lines changed

.github/workflows/python-publish.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,16 @@ ghostos init
6565
```
6666

6767
Configure the model. Default to use OpenAI `gpt-4o`, requiring the environment variable `OPENAI_API_KEY`.
68-
Or you can use configuration ui by streamlit:
6968

69+
```bash
70+
export OPENAI_API_KEY="your openai api key"
71+
# Optionals:
72+
export OPENAI_PROXY="sock5://localhost:[your-port]" # setup openai proxy
73+
export DEEPSEEK_API_KEY="your deepseek api key"
74+
epoxrt MOONSHOT_API_KEY="your moonshot api key"
75+
```
76+
77+
Or you can use configuration ui by streamlit:
7078
```bash
7179
ghostos config
7280
```
@@ -85,11 +93,32 @@ that can be instructed to call functions or methods within the file through natu
8593
ghostos web [my_path_file_path]
8694
```
8795

88-
ou can create a local Python file and define your own Agents. For more details
96+
some demo agents
97+
```bash
98+
ghostos web ghostos.demo.agents.jojo
99+
ghostos web ghostos.demo.test_agents.moonshot # moonshot-v1-32k model
100+
ghostos web ghostos.demo.test_agents.deepseek_chat # deepseek chat model
101+
ghostos web ghostos.demo.test_agents.openai_o1_mini # openai o1 mini model
102+
```
103+
104+
You can create a local Python file and define your own Agents. For more details
89105

90106
* [Chatbot](docs/zh-cn/usages/chatbot.md): simplest chatbot
91107
* [MossAgent](docs/zh-cn/usages/moss_agent.md): an agent that can interact with the python module
92108

109+
## Install Realtime
110+
111+
`GhostOS` support [OpenAI Realtime](https://platform.openai.com/docs/guides/realtime),
112+
using [pyaudio](https://pypi.org/project/PyAudio/) to handle realtime audio i/o.
113+
Need to install the dependencies first:
114+
115+
```bash
116+
pip install 'ghostos[realtime]'
117+
```
118+
119+
> You may face some difficulties while install pyaudio on your device,
120+
> I'm sure gpt-4o, google or stackoverflow will offer you solutions.
121+
93122
## Use In Python
94123

95124
```python

docs/en/README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,15 @@ ghostos init
6666
```
6767

6868
Configure the model. Default to use OpenAI `gpt-4o`, requiring the environment variable `OPENAI_API_KEY`.
69+
70+
```bash
71+
export OPENAI_API_KEY="your openai api key"
72+
# Optionals:
73+
export OPENAI_PROXY="sock5://localhost:[your-port]" # setup openai proxy
74+
export DEEPSEEK_API_KEY="your deepseek api key"
75+
epoxrt MOONSHOT_API_KEY="your moonshot api key"
76+
```
77+
6978
Or you can use configuration ui by streamlit:
7079

7180
```bash
@@ -86,11 +95,33 @@ that can be instructed to call functions or methods within the file through natu
8695
ghostos web [my_path_file_path]
8796
```
8897

89-
you can create a local Python file and define your own Agents. For more details
98+
some demo agents
99+
100+
```bash
101+
ghostos web ghostos.demo.agents.jojo
102+
ghostos web ghostos.demo.test_agents.moonshot # moonshot-v1-32k model
103+
ghostos web ghostos.demo.test_agents.deepseek_chat # deepseek chat model
104+
ghostos web ghostos.demo.test_agents.openai_o1_mini # openai o1 mini model
105+
```
106+
107+
You can create a local Python file and define your own Agents. For more details
90108

91109
* [Chatbot](/en/usages/chatbot.md): simplest chatbot
92110
* [MossAgent](/en/usages/moss_agent.md): an agent that can interact with the python module
93111

112+
## Install Realtime
113+
114+
`GhostOS` support [OpenAI Realtime](https://platform.openai.com/docs/guides/realtime),
115+
using [pyaudio](https://pypi.org/project/PyAudio/) to handle realtime audio i/o.
116+
Need to install the dependencies first:
117+
118+
```bash
119+
pip install 'ghostos[realtime]'
120+
```
121+
122+
> You may face some difficulties while install pyaudio on your device,
123+
> I'm sure gpt-4o, google or stackoverflow will offer you solutions.
124+
94125
## Use In Python
95126

96127
```python

docs/en/getting_started/installation.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ natural language dialogue.
3737
ghostos web [my_path_file_path]
3838
```
3939

40+
## Install Realtime
41+
42+
install realtime dependencies (mainly `pyaudio`):
43+
44+
```bash
45+
pip install 'ghostos[realtime]'
46+
```
47+
4048
## Workspace
4149

4250
`GhostOS` is currently using local files to store runtime data, so it's necessary to initialize a workspace.
@@ -56,7 +64,8 @@ ghostos clear-runtime
5664

5765
There are two ways to define these environment variables:
5866

59-
Using a `.env` file (automatically read through `dotenv`)
67+
* Export the environment variables to your shell.
68+
* Using a `.env` file (automatically read through `dotenv`)
6069

6170
```bash
6271

docs/zh-cn/README.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,16 @@ ghostos init
5959
```
6060

6161
配置大模型. 默认使用 OpenAI `gpt-4o`, 要求环境变量存在 `OPENAI_API_KEY`.
62-
或者运行 `streamlit` 编辑界面:
62+
63+
```bash
64+
export OPENAI_API_KEY="your openai api key"
65+
# Optionals:
66+
export OPENAI_PROXY="sock5://localhost:[your-port]" # setup openai proxy
67+
export DEEPSEEK_API_KEY="your deepseek api key"
68+
epoxrt MOONSHOT_API_KEY="your moonshot api key"
69+
```
70+
71+
或者运行 `streamlit` 打开配置界面:
6372

6473
```bash
6574
ghostos config
@@ -78,11 +87,32 @@ ghostos web ghostos.demo.agents.jojo
7887
ghostos web [my_path_file_path]
7988
```
8089

90+
当前的测试用例:
91+
92+
```bash
93+
ghostos web ghostos.demo.agents.jojo
94+
ghostos web ghostos.demo.test_agents.moonshot # moonshot-v1-32k model
95+
ghostos web ghostos.demo.test_agents.deepseek_chat # deepseek chat model
96+
ghostos web ghostos.demo.test_agents.openai_o1_mini # openai o1 mini model
97+
```
98+
8199
可以通过创建本地 python 文件, 定义出自己的 Agents. 详情请见:
82100

83101
* [Chatbot](/zh-cn/usages/chatbot.md): 极简的对话机器人
84102
* [MossAgent](/zh-cn/usages/moss_agent.md): 能使用 python 的 agent
85103

104+
## Install Realtime
105+
106+
`GhostOS` 当前支持 [OpenAI Realtime](https://platform.openai.com/docs/guides/realtime),
107+
使用 [pyaudio](https://pypi.org/project/PyAudio/) 来处理实时语音的输入输出.
108+
需要安装相关依赖:
109+
110+
```bash
111+
pip install 'ghostos[realtime]'
112+
```
113+
114+
> 在安装 pyaudio 的时候可能会遇到一些问题, 我相信 gpt-4o, google 和 stackoverflow 能够很好地帮助你解决它们.
115+
86116
## Use In Python
87117

88118
```python

docs/zh-cn/getting_started/installation.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ ghostos web ghostos.demo.agents.jojo
3434
ghostos web [my_path_file_path]
3535
```
3636

37+
## Install Realtime
38+
39+
安装 realtime 所需的依赖:
40+
41+
```bash
42+
pip install 'ghostos[realtime]'
43+
```
44+
3745
## Workspace
3846

3947
`GhostOS` 当前版本使用本地文件来存运行时数据. 所以需要初始化一个 workspace.
@@ -51,6 +59,7 @@ ghostos clear-runtime
5159
`GhostOS` 依赖各种模型的 `access token`, 默认是从环境变量中读取.
5260
定义这些环境变量有两种方法:
5361

62+
- export 环境变量到命令行中.
5463
- 使用 `.env` 文件 (自动通过 `dotenv` 读取)
5564

5665
```bash

ghostos/__main__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from ghostos.scripts.cli import main
2+
3+
if __name__ == "__main__":
4+
main(prog_name="help")

ghostos/app/.example.env

100644100755
File mode changed.

ghostos/app/.gitignore

100644100755
File mode changed.

ghostos/app/.streamlit/config.toml

100644100755
File mode changed.

0 commit comments

Comments
 (0)