12345678910111213141516171819202122232425262728293031323334 |
- package dify
- type ChatReq struct {
- Query string `json:"query"`
- ConversationId string `json:"conversation_id"`
- User string `json:"user"`
- ResponseMode string `json:"response_mode"`
- Files []File `json:"files"`
- Inputs interface{} `json:"inputs"`
- }
- type File struct {
- Type string `json:"type"`
- TransferMethod string `json:"transfer_method"`
- Url string `json:"url"`
- }
- type ChatResp struct {
- Event string `json:"event"`
- ConversationId string `json:"conversation_id"`
- MessageId string `json:"message_id"`
- CreatedAt uint64 `json:"created_at"`
- TaskId string `json:"task_id"`
- Id string `json:"id"`
- Answer string `json:"answer,optional"`
- }
- type Metadata struct {
- }
- // GetChatUrl 请求地址
- func GetChatUrl() string {
- return "/chat-messages"
- }
|