Files
Manuel de la Peña 8d4c17fc73 ci: migrate linting golangci-lint to v2.0.2 (#1217)
* chore: use slices and maps packages

* chore: skip embedded type

* chore: use fmt.Fprint instead

* chore: use switch

* chore: reorder imports

* chore: add white lines

* chore: use t.Setenv

* chore: excplicitly omit non used param

* chore: use t.TempDir

* chore: use maps package

* chore: migrate golangci-lint config file

Run: "golangci-lint migrate -c .golangci.yaml --skip-validation"

* chore: bump golangci-lint action to v7
2025-04-12 01:54:50 -07:00

31 lines
468 B
Go

package main
import (
"context"
"fmt"
"os"
"github.com/tmc/langchaingo/llms/maritaca"
)
func main() {
token := os.Getenv("MARITACA_KEY")
opts := []maritaca.Option{
maritaca.WithToken(token),
maritaca.WithModel("sabia-2-medium"),
}
llm, err := maritaca.New(opts...)
if err != nil {
panic(err)
}
prompt := "How many people live in Brazil?"
resp, err := llm.Call(context.Background(), prompt)
if err != nil {
panic(err)
}
fmt.Println(resp)
}