https://github.com/httpjamesm/together-ai-go
Go API library for together.ai
https://github.com/httpjamesm/together-ai-go
ai go golang togetherai
Last synced: 7 months ago
JSON representation
Go API library for together.ai
- Host: GitHub
- URL: https://github.com/httpjamesm/together-ai-go
- Owner: httpjamesm
- License: mit
- Created: 2023-09-09T22:25:48.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-09-11T21:33:58.000Z (about 2 years ago)
- Last Synced: 2025-01-23T10:36:47.603Z (9 months ago)
- Topics: ai, go, golang, togetherai
- Language: Go
- Homepage:
- Size: 9.77 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# together-ai-go
Unofficial API library for [together.ai](https://together.ai)
## Quickstart
### Create a new client
```go
client := togetherai.NewClient(os.Getenv("TOGETHERAI_API_KEY"))
```### Infer with a model
```go
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)
```