Skip to content

Commit

Permalink
docs: update image to text example
Browse files Browse the repository at this point in the history
  • Loading branch information
nbox363 committed Dec 30, 2024
1 parent 33b4dbf commit 38b0b0d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/image_to_text/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
_ "github.com/joho/godotenv/autoload"

"github.com/neurocult/agency"
"github.com/neurocult/agency/providers/openai"
openAIProvider "github.com/neurocult/agency/providers/openai"
"github.com/sashabaranov/go-openai"
)

func main() {
Expand All @@ -17,8 +18,8 @@ func main() {
panic(err)
}

result, err := openai.New(openai.Params{Key: os.Getenv("OPENAI_API_KEY")}).
ImageToText(openai.ImageToTextParams{MaxTokens: 300}).
result, err := openAIProvider.New(openAIProvider.Params{Key: os.Getenv("OPENAI_API_KEY")}).
ImageToText(openAIProvider.ImageToTextParams{Model: openai.GPT4o, MaxTokens: 300}).
SetPrompt("describe what you see").
Execute(
context.Background(),
Expand Down

0 comments on commit 38b0b0d

Please sign in to comment.