Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

Commit

Permalink
fix metadata issue (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
linweiyuan committed Oct 5, 2023
1 parent 76ce67a commit cfb3b88
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/chatgpt/typings.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ type CreateConversationRequest struct {

func (c *CreateConversationRequest) AddMessage(role string, content string) {
c.Messages = append(c.Messages, Message{
ID: uuid.New().String(),
Author: Author{Role: role},
Content: Content{ContentType: "text", Parts: []interface{}{content}},
ID: uuid.New().String(),
Author: Author{Role: role},
Content: Content{ContentType: "text", Parts: []interface{}{content}},
Metadata: map[string]string{},
})
}

Expand Down

0 comments on commit cfb3b88

Please sign in to comment.