Skip to content

Conversation

pavelgj
Copy link
Collaborator

@pavelgj pavelgj commented Jun 26, 2024

  model.Generate(context.Background(), ai.NewUserTextGenerateRequest("tell me about bananas"), nil)

  model.Generate(
        context.Background(),
        ai.NewGenerateRequest(
            map[string]any{"temparature": 1},
            ai.NewSystemTextMessage("talk like a pirate"),
            ai.NewUserMessage(ai.NewMediaPart("image/png", img)),
            ai.NewModelTextMessage("This looks nice yarrr"),
            ai.NewUserTextMessage("tell me more....")),
        nil)

@pavelgj pavelgj changed the title feat: [Go] PROPOSAL: simple request builder feat: [Go] PROPOSAL: simple request helpers Jun 26, 2024
pavelgj and others added 3 commits June 26, 2024 13:21
Co-authored-by: Alex Pascal <apascal07@gmail.com>
Co-authored-by: Alex Pascal <apascal07@gmail.com>
Co-authored-by: Alex Pascal <apascal07@gmail.com>
pavelgj and others added 5 commits June 26, 2024 13:24
Co-authored-by: Alex Pascal <apascal07@gmail.com>
Co-authored-by: Alex Pascal <apascal07@gmail.com>
Co-authored-by: Alex Pascal <apascal07@gmail.com>
Co-authored-by: Alex Pascal <apascal07@gmail.com>
Co-authored-by: Alex Pascal <apascal07@gmail.com>
@pavelgj pavelgj marked this pull request as ready for review June 26, 2024 17:33
@apascal07
Copy link
Collaborator

Remove the helper I added yesterday and update the init sample please.

@pavelgj pavelgj changed the title feat: [Go] PROPOSAL: simple request helpers feat: [Go] simple request helpers Jun 26, 2024
@pavelgj
Copy link
Collaborator Author

pavelgj commented Jun 26, 2024

Remove the helper I added yesterday and update the init sample please.

which one did you add?

@apascal07
Copy link
Collaborator

Remove the helper I added yesterday and update the init sample please.

which one did you add?

func NewTextMessages(r Role, m string) []*Message {

@pavelgj
Copy link
Collaborator Author

pavelgj commented Jun 26, 2024

Remove the helper I added yesterday and update the init sample please.

which one did you add?

func NewTextMessages(r Role, m string) []*Message {

Ah... done.

@pavelgj pavelgj merged commit e63cb50 into main Jun 26, 2024
@pavelgj pavelgj deleted the pj/goRequestBuilder branch June 26, 2024 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants