GetChatDiffContents returns resolved diff contents for a chat.
(ctx context.Context, chatID uuid.UUID)
| 3262 | |
| 3263 | // GetChatDiffContents returns resolved diff contents for a chat. |
| 3264 | func (c *ExperimentalClient) GetChatDiffContents(ctx context.Context, chatID uuid.UUID) (ChatDiffContents, error) { |
| 3265 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/experimental/chats/%s/diff", chatID), nil) |
| 3266 | if err != nil { |
| 3267 | return ChatDiffContents{}, err |
| 3268 | } |
| 3269 | defer res.Body.Close() |
| 3270 | if res.StatusCode != http.StatusOK { |
| 3271 | return ChatDiffContents{}, ReadBodyAsError(res) |
| 3272 | } |
| 3273 | var diff ChatDiffContents |
| 3274 | return diff, json.NewDecoder(res.Body).Decode(&diff) |
| 3275 | } |
| 3276 | |
| 3277 | // UploadChatFile uploads a file for use in chat messages. |
| 3278 | func (c *ExperimentalClient) UploadChatFile(ctx context.Context, organizationID uuid.UUID, contentType string, filename string, rd io.Reader) (UploadChatFileResponse, error) { |