123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208 |
- import "../base.api"
- type (
-
- ChatRecordsInfo {
- BaseIDInfo
-
- Content *string `json:"content,optional"`
-
- ContentType *uint8 `json:"contentType,optional"`
-
- RoleType *string `json:"roleType,optional"`
-
- SessionId *uint64 `json:"sessionId,optional"`
-
- UserId *uint64 `json:"userId,optional"`
-
- BotId *uint64 `json:"botId,optional"`
-
- BotType *uint8 `json:"botType,optional,options=1|2|3"`
- Finish bool `json:"finish,optional"`
- }
-
- ChatRecordsListResp {
- BaseDataInfo
-
- Data ChatRecordsListInfo `json:"data"`
- }
-
- ChatRecordsListInfo {
- BaseListInfo
-
- Data []ChatRecordsInfo `json:"data"`
- }
-
- ChatRecordsListReq {
- PageInfo
- SessionId *uint64 `json:"sessionId"`
- BotId *uint64 `json:"botId,optional"`
- BotType *uint8 `json:"botType,optional"`
- }
-
- ChatRecordsInfoResp {
- BaseDataInfo
-
- Data ChatRecordsInfo `json:"data"`
- }
- ChatRecommendReq {
- SessionId *uint64 `json:"sessionId"`
- }
- ChatRecommendResp {
- BaseDataInfo
-
- Data ChatRecommend `json:"data"`
- }
- ChatRecommend {
- Data []string `json:"data"`
- SessionId uint64 `json:"sessionId"`
- }
- ChatAskReq {
- CardId *uint64 `json:"cardId"`
- Question *string `json:"question"`
- SessionId *int `json:"sessionId"`
- }
- ChatAskResp {
- BaseDataInfo
- Data *string `json:"data"`
- }
- GptChatReq{
- ConversationId *string `json:"conversationId,optional"`
- Content *string `json:"content"`
- AgentId *uint64 `json:"agentId"`
- }
- GptMessageReq {
- ConversationId *string `json:"conversationId,optional"`
- FirstId *string `json:"firstId,optional"`
- Limit *int `json:"limit"`
- AgentId *uint64 `json:"agentId"`
- }
- GptMessageResp {
- BaseDataInfo
- Data GptMessageList `json:"data"`
- }
- GptMessageList {
- HasMore bool `json:"hasMore"`
- Data []Message `json:"data"`
- }
- Message {
- Id *string `json:"id"`
- ConversationId *string `json:"conversationId,optional"`
- Query *string `json:"query"`
- Answer *string `json:"answer"`
- Inputs interface{} `json:"inputs"`
- CreatedAt *int `json:"createdAt"`
- }
- GptsSessionReq {
- Limit *int `json:"limit"`
- LastId *string `json:"lastId,optional"`
- AgentId *uint64 `json:"agentId"`
- }
- GptsSessionResp {
- BaseDataInfo
- Data GptsSessionList `json:"data"`
- }
- GptsSessionList {
- HasMore bool `json:"hasMore"`
- Data []Session `json:"data"`
- }
- Session {
- Id *string `json:"id"`
- Name *string `json:"name"`
- CreatedAt *int `json:"createdAt"`
- Inputs interface{} `json:"inputs"`
- }
- )
- @server(
- group: chatrecords
- )
- service Wechat {
-
- @handler gptsSubmitApiChat
- post /gpts/chat/submit (GptChatReq)
-
- @handler gptsGetApiMessage
- post /gpts/chat/message (GptMessageReq) returns (GptMessageResp)
-
- @handler gptsGetApiSession
- post /gpts/chat/session (GptsSessionReq) returns (GptsSessionResp)
- }
- @server(
- jwt: Auth
- group: chatrecords
- middleware: Miniprogram
- )
- service Wechat {
-
- @handler submitApiChat
- post /api/chat/create (ChatRecordsInfo)
-
- @handler answerApiChat
- post /api/chat/answer (ChatAskReq) returns (ChatAskResp)
-
- @handler getApiChatList
- post /api/chat/list (ChatRecordsListReq) returns (ChatRecordsListResp)
-
- @handler getApiRecommendChat
- post /api/chat/recommmend (ChatRecommendReq) returns (ChatRecommendResp)
- }
- @server(
- jwt: Auth
- group: chatrecords
- middleware: Authority
- )
- service Wechat {
-
- @handler createChatRecords
- post /chat_records/create (ChatRecordsInfo) returns (BaseMsgResp)
-
- @handler updateChatRecords
- post /chat_records/update (ChatRecordsInfo) returns (BaseMsgResp)
-
- @handler deleteChatRecords
- post /chat_records/delete (IDsReq) returns (BaseMsgResp)
-
- @handler getChatRecordsList
- post /chat_records/list (ChatRecordsListReq) returns (ChatRecordsListResp)
-
- @handler getChatRecordsById
- post /chat_records (IDReq) returns (ChatRecordsInfoResp)
- }
|