Skip to content

Commit

Permalink
llms: GenerateFromSinglePrompt struct literal uses unkeyed fields (#926)
Browse files Browse the repository at this point in the history
  • Loading branch information
iocron authored Sep 13, 2024
1 parent f01a52c commit a2a466f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llms/llms.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Model interface {
func GenerateFromSinglePrompt(ctx context.Context, llm Model, prompt string, options ...CallOption) (string, error) {
msg := MessageContent{
Role: ChatMessageTypeHuman,
Parts: []ContentPart{TextContent{prompt}},
Parts: []ContentPart{TextContent{Text: prompt}},
}

resp, err := llm.GenerateContent(ctx, []MessageContent{msg}, options...)
Expand Down

0 comments on commit a2a466f

Please sign in to comment.