feat(project): 项目完结
This commit is contained in:
47
internal/domain/agent/model/command.go
Normal file
47
internal/domain/agent/model/command.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package model
|
||||
|
||||
type ArmoryCommand struct {
|
||||
Table AiAgentConfigTable
|
||||
}
|
||||
|
||||
type ChatCommand struct {
|
||||
AgentID string
|
||||
UserID string
|
||||
SessionID string
|
||||
Message string
|
||||
Content ChatContent
|
||||
}
|
||||
|
||||
type ChatContent struct {
|
||||
Texts []TextPart
|
||||
Files []FilePart
|
||||
InlineDatas []InlineDataPart
|
||||
}
|
||||
|
||||
type TextPart struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
type FilePart struct {
|
||||
FileURI string
|
||||
MimeType string
|
||||
}
|
||||
|
||||
type InlineDataPart struct {
|
||||
Bytes []byte
|
||||
MimeType string
|
||||
}
|
||||
|
||||
type RegisteredAgent struct {
|
||||
AppName string
|
||||
AgentID string
|
||||
AgentName string
|
||||
AgentDesc string
|
||||
Runner Runner
|
||||
}
|
||||
|
||||
type Runner interface {
|
||||
CreateSession(userID string) (string, error)
|
||||
Run(userID, sessionID string, content ChatContent) ([]string, error)
|
||||
Stream(userID, sessionID string, content ChatContent) (<-chan string, <-chan error)
|
||||
}
|
||||
Reference in New Issue
Block a user