f5368c825f
重构了editor agent. 使得它能进行多轮工具调用, 把工具调用的结果嵌入到上下文里。 对于上下文的图片, 使用哈希后的id用来引用,不暴露细节信息to llm。 当前实现, 状态直接维护在json doc里, 需要对整个doc加锁,任务目前只能串行。 把SSE改成一个简单请求( 因为生图工具耗时需要二次确认, 不需要再实时展示给用户进度)。 增加确认/取消生图操作。 把tool的参数和错误情况做了反馈。 TODO: 工具调用的规范/prompt还可以改进。 改用external job来做素材生成, 针对来自editor agent 的生成会把生成资产的引用加入到结果json里, 客户端轮询 external job 确定生成状态, 发现结束了或者失败了就 重新get 会话,后端重新提供会话的时候把 结果插入回会话历史里,用来让 ai 引用 以及显示 --------- Co-authored-by: 段舒康 <kdletters@qq.com> Reviewed-on: https://git.genarrative.world/git/GenarrativeAI/Genarrative/pulls/76 Reviewed-by: 段舒康 <kdletters@qq.com> Co-authored-by: 王德宇 <kvtodev@outlook.com> Co-committed-by: 王德宇 <kvtodev@outlook.com>
82 lines
3.1 KiB
TOML
82 lines
3.1 KiB
TOML
[package]
|
|
name = "api-server"
|
|
edition.workspace = true
|
|
version.workspace = true
|
|
license.workspace = true
|
|
|
|
[dependencies]
|
|
aes = { workspace = true }
|
|
async-stream = { workspace = true }
|
|
axum = { workspace = true, features = ["ws"] }
|
|
base64 = { workspace = true }
|
|
cbc = { workspace = true }
|
|
bytes = { workspace = true }
|
|
dotenvy = { workspace = true }
|
|
hex = { workspace = true }
|
|
image = { workspace = true, features = ["jpeg", "png", "webp"] }
|
|
http-body-util = { workspace = true }
|
|
reqwest = { workspace = true, features = ["json", "multipart", "rustls-tls"] }
|
|
webp = { workspace = true }
|
|
module-ai = { workspace = true }
|
|
module-assets = { workspace = true, features = ["server-service"] }
|
|
module-auth = { workspace = true }
|
|
module-big-fish = { workspace = true }
|
|
module-bark-battle = { workspace = true }
|
|
module-combat = { workspace = true }
|
|
module-creative-agent = { workspace = true }
|
|
module-custom-world = { workspace = true }
|
|
module-editor-agent = { workspace = true }
|
|
module-inventory = { workspace = true }
|
|
module-match3d = { workspace = true }
|
|
module-npc = { workspace = true }
|
|
module-puzzle = { workspace = true }
|
|
module-puzzle-clear = { workspace = true }
|
|
module-runtime = { workspace = true }
|
|
module-runtime-story = { workspace = true }
|
|
module-runtime-item = { workspace = true }
|
|
module-square-hole = { workspace = true }
|
|
module-story = { workspace = true }
|
|
module-visual-novel = { workspace = true }
|
|
platform-agent = { workspace = true }
|
|
platform-editor-agent = { workspace = true }
|
|
platform-audio = { workspace = true }
|
|
platform-auth = { workspace = true }
|
|
platform-hyper3d = { workspace = true }
|
|
platform-image = { workspace = true }
|
|
platform-llm = { workspace = true }
|
|
platform-matting = { workspace = true }
|
|
platform-oss = { workspace = true }
|
|
platform-speech = { workspace = true }
|
|
platform-wechat = { workspace = true }
|
|
hmac = { workspace = true }
|
|
ring = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
sha1 = { workspace = true }
|
|
sha2 = { workspace = true }
|
|
shared-contracts = { workspace = true, features = ["oss-contracts"] }
|
|
shared-kernel = { workspace = true }
|
|
shared-logging = { workspace = true }
|
|
socket2 = { workspace = true }
|
|
spacetime-client = { workspace = true }
|
|
tokio = { workspace = true, features = ["macros", "rt-multi-thread", "net", "time", "sync", "fs", "io-util", "signal", "process"] }
|
|
tokio-stream = { workspace = true }
|
|
futures-util = { workspace = true }
|
|
time = { workspace = true, features = ["formatting"] }
|
|
tower-http = { workspace = true, features = ["trace"] }
|
|
tracing = { workspace = true }
|
|
opentelemetry = { workspace = true }
|
|
url = { workspace = true }
|
|
urlencoding = { workspace = true }
|
|
uuid = { workspace = true, features = ["v4"] }
|
|
zip = { workspace = true, features = ["deflate"] }
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
windows-sys = { workspace = true, features = ["Win32_Foundation", "Win32_System_Diagnostics_ToolHelp", "Win32_System_ProcessStatus", "Win32_System_Threading"] }
|
|
|
|
[dev-dependencies]
|
|
base64 = { workspace = true }
|
|
http-body-util = { workspace = true }
|
|
reqwest = { workspace = true, features = ["json", "multipart", "rustls-tls"] }
|
|
tower = { workspace = true, features = ["util"] }
|