feat: Support for Chat Flow & Agent Support for binding a single chat flow (#765)
Co-authored-by: Yu Yang <72337138+tomasyu985@users.noreply.github.com> Co-authored-by: zengxiaohui <csu.zengxiaohui@gmail.com> Co-authored-by: lijunwen.gigoo <lijunwen.gigoo@bytedance.com> Co-authored-by: lvxinyu.1117 <lvxinyu.1117@bytedance.com> Co-authored-by: liuyunchao.0510 <liuyunchao.0510@bytedance.com> Co-authored-by: haozhenfei <37089575+haozhenfei@users.noreply.github.com> Co-authored-by: July <jiangxujin@bytedance.com> Co-authored-by: tecvan-fe <fanwenjie.fe@bytedance.com>
This commit is contained in:
@@ -5,4 +5,5 @@ namespace go conversation.agentrun
|
||||
service AgentRunService {
|
||||
run.AgentRunResponse AgentRun(1: run.AgentRunRequest request)(api.post='/api/conversation/chat', api.category="conversation", api.gen_path= "agent_run")
|
||||
run.ChatV3Response ChatV3(1: run.ChatV3Request request)(api.post = "/v3/chat", api.category="chat", api.tag="openapi", api.gen_path="chat")
|
||||
run.CancelChatApiResponse CancelChatApi(1: run.CancelChatApiRequest request) (api.post = '/v3/chat/cancel', api.category = "chat", api.tag="openapi", agw.preserve_base = "true")
|
||||
}
|
||||
@@ -12,4 +12,5 @@ enum Scene{
|
||||
PromptOptimize = 7, //Prompt optimization
|
||||
GenerateAgentInfo = 8 // Createbot's nl2bot features
|
||||
SceneOpenApi = 9, //openapi
|
||||
SceneWorkflow = 50 , // workflow
|
||||
}
|
||||
@@ -36,6 +36,7 @@ struct ConversationData {
|
||||
5: optional i64 ConnectorID (api.body = "connector_id", agw.key="connector_id", api.js_conv="true")
|
||||
6: optional i64 LastSectionID (api.body="last_section_id", api.js_conv="true")
|
||||
7: optional i64 AccountID (api.body = "account_id")
|
||||
8: optional string Name (api.body = "name")
|
||||
}
|
||||
|
||||
struct CreateConversationRequest {
|
||||
@@ -92,3 +93,28 @@ struct ListConversationData {
|
||||
2 : bool has_more (api.body = "has_more", agw.key = "has_more")
|
||||
}
|
||||
|
||||
struct UpdateConversationApiRequest {
|
||||
1: optional i64 ConversationID (api.path= "conversation_id", agw.js_conv="str", api.js_conv="true")
|
||||
2: optional string Name (api.body = "name")
|
||||
255: base.Base Base
|
||||
}
|
||||
|
||||
struct UpdateConversationApiResponse {
|
||||
1: optional ConversationData ConversationData (api.body = "data", agw.key = "data")
|
||||
2 : i32 Code (api.body = "code")
|
||||
3 : string Msg (api.body = "msg")
|
||||
255: required base.BaseResp BaseResp
|
||||
}
|
||||
|
||||
struct DeleteConversationApiRequest {
|
||||
1: optional i64 ConversationID (api.path="conversation_id", agw.js_conv="true")
|
||||
|
||||
255: base.Base Base
|
||||
}
|
||||
|
||||
struct DeleteConversationApiResponse {
|
||||
1 : i32 Code (api.body = "code")
|
||||
2 : string Msg (api.body = "msg")
|
||||
255: base.BaseResp BaseResp
|
||||
}
|
||||
|
||||
|
||||
@@ -10,5 +10,6 @@ service ConversationService {
|
||||
conversation.ClearConversationApiResponse ClearConversationApi(1: conversation.ClearConversationApiRequest req)(api.post='/v1/conversations/:conversation_id/clear', api.category="conversation", api.tag="openapi", agw.preserve_base="true")
|
||||
|
||||
conversation.ListConversationsApiResponse ListConversationsApi(1: conversation.ListConversationsApiRequest request) (api.get = '/v1/conversations', api.category = "conversation", api.tag="openapi", agw.preserve_base = "true")
|
||||
|
||||
conversation.UpdateConversationApiResponse UpdateConversationApi(1: conversation.UpdateConversationApiRequest request) (api.put = '/v1/conversations/:conversation_id', api.category = "conversation", api.tag="openapi", agw.preserve_base = "true")
|
||||
conversation.DeleteConversationApiResponse DeleteConversationApi(1: conversation.DeleteConversationApiRequest req)(api.delete='/v1/conversations/:conversation_id', api.category="conversation", api.tag="openapi", agw.preserve_base="true")
|
||||
}
|
||||
@@ -214,4 +214,6 @@ struct ListMessageApiResponse {
|
||||
2: optional bool has_more (api.body = "has_more") // Is there still data, true yes, false no
|
||||
3: optional i64 first_id (api.body = "first_id",api.js_conv='true') // The ID of the first piece of data
|
||||
4: optional i64 last_id (api.body = "last_id",api.js_conv='true') // The id of the last piece of data.
|
||||
253: i64 code
|
||||
254: string msg
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ struct AdditionalContent {
|
||||
1: required string type
|
||||
2: optional string text
|
||||
3: optional string file_url
|
||||
4: optional i64 file_id (api.js_conv='true')
|
||||
}
|
||||
|
||||
struct AgentRunRequest {
|
||||
@@ -241,4 +242,15 @@ struct ChatV3Response {
|
||||
1: optional ChatV3ChatDetail ChatDetail (api.body = "data"),
|
||||
2: required i32 Code (api.body = "code"),
|
||||
3: required string Msg (api.body = "msg")
|
||||
}
|
||||
|
||||
struct CancelChatApiRequest {
|
||||
1: required i64 ChatID (api.body = "chat_id", agw.key = "chat_id",api.js_conv='true')
|
||||
2: required i64 ConversationID (api.body = "conversation_id", agw.key = "conversation_id",api.js_conv='true')
|
||||
255: base.Base Base
|
||||
}
|
||||
|
||||
struct CancelChatApiResponse {
|
||||
1: ChatV3ChatDetail ChatV3ChatDetail (agw.key = "data")
|
||||
255: base.BaseResp BaseResp
|
||||
}
|
||||
Reference in New Issue
Block a user