Skip to content

Commit ad48cfd

Browse files
committed
0.1.0
1 parent a52a558 commit ad48cfd

13 files changed

+410
-34
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
/target
2+
/output
3+
4+
gui_config.json

Cargo.lock

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,26 @@
22
name = "dioxus-openai-qa-gui"
33
version = "0.1.0"
44
edition = "2021"
5+
description = "openai qa gui tool using gpt3.5"
56

67
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
78

89
[dependencies]
10+
chrono = "0.4.23"
911
dioxus = "0.3.2"
1012
dioxus-desktop = "0.3.0"
1113
markdown = "0.3.0"
1214
reqwest = "0.11.14"
1315
serde = "1.0.154"
1416
serde_json = "1.0.94"
1517
tokio = "1.26.0"
18+
19+
[target.'cfg(windows)'.build-dependencies]
20+
winres = "0.1"
21+
22+
[package.metadata.bundle]
23+
name = "dioxus-openai-qa-gui"
24+
identifier = "io.github.fairjm.dioxus-openai-qa-gui"
25+
version = "0.1.0"
26+
copyright = "Copyright (c) fairjm 2023. All rights reserved."
27+
short_description = "openai qa gui tool using gpt3.5"

build.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
use std::io;
2+
#[cfg(windows)] use winres::WindowsResource;
3+
4+
fn main() -> io::Result<()> {
5+
#[cfg(windows)] {
6+
WindowsResource::new()
7+
.set_icon("favicon-32x32.ico")
8+
.compile()?;
9+
}
10+
Ok(())
11+
}

favicon-32x32.ico

90.9 KB
Binary file not shown.

readme.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# 一个简单的openai chat接口测试小工具
2+
基于 [dioxus](https://github.com/DioxusLabs/dioxus)[bulma](https://bulma.io/documentation/components/modal/) (css)
3+
4+
# Intro
5+
用来做一些简单的问答(没有实现对话),可以保存prompt进行一些验证,探索。
6+
7+
![](readme/image.PNG)
8+
9+
## 设置
10+
![](readme/setting.png)
11+
第一项是proxy的地址 如果可以直连就使用`https://api.openai.com`
12+
第二项是openai的secret
13+
设置会在生成`gui_config.json`文件, secret明文存储请注意安全
14+
15+
## prompts
16+
![](readme/prompts.png)
17+
prompts列表会生成`system_prompts.json`文件
18+
可以直接复制/编辑这个文件来修改内容(需要重新打开应用,不然会被应用覆盖)
19+
20+
正常返回输出的内容在程序所在的`output\`目录中
21+
22+
23+
# How to run
24+
需要本地安装`rust`, windows环境有edge(`webview2`)即可。
25+
其他环境参考: [dioxuslabs - desktop](https://dioxuslabs.com/docs/0.3/guide/en/getting_started/desktop.html)
26+
27+
执行:
28+
```shell
29+
cargo run
30+
31+
# debug build
32+
cargo build
33+
34+
# release build
35+
cargo build --release
36+
```

readme/image.PNG

66 KB
Loading

readme/prompts.png

7.93 KB
Loading

readme/setting.png

5.07 KB
Loading
File renamed without changes.

src/icon.rs

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)