Unofficial API library for together.ai
client := togetherai.NewClient(os.Getenv("TOGETHERAI_API_KEY"))
resp, err := client.NewInference(InferenceConfig{
Model: "togethercomputer/RedPajama-INCITE-7B-Instruct",
Prompt: "The capital of France is",
MaxTokens: 128,
Stop: &stopStrings,
})
if err != nil {
panic(err)
}
fmt.Println(resp.Output.Choices)