1
0
mirror of https://github.com/ManyakRus/starter.git synced 2025-12-11 01:00:29 +02:00

сделал CreateFromStdTime

This commit is contained in:
Nikitin Aleksandr
2023-12-25 13:30:55 +03:00
parent 2c25ce7ae7
commit 0c5ee45514
567 changed files with 33952 additions and 9761 deletions

View File

@@ -29,6 +29,11 @@ type Message struct {
type MessagesList struct {
Messages []Message `json:"data"`
Object string `json:"object"`
FirstID *string `json:"first_id"`
LastID *string `json:"last_id"`
HasMore bool `json:"has_more"`
httpHeader
}
@@ -71,7 +76,7 @@ type MessageFilesList struct {
// CreateMessage creates a new message.
func (c *Client) CreateMessage(ctx context.Context, threadID string, request MessageRequest) (msg Message, err error) {
urlSuffix := fmt.Sprintf("/threads/%s/%s", threadID, messagesSuffix)
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request))
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request), withBetaAssistantV1())
if err != nil {
return
}