Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sashabaranov/kagi-summarizer-api
https://github.com/sashabaranov/kagi-summarizer-api
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sashabaranov/kagi-summarizer-api
- Owner: sashabaranov
- License: apache-2.0
- Created: 2023-02-04T06:50:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-22T20:26:32.000Z (over 1 year ago)
- Last Synced: 2024-06-20T13:34:06.901Z (3 months ago)
- Language: Go
- Size: 12.7 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kagi-summarizer-api
[![Go Reference](https://pkg.go.dev/badge/github.com/sashabaranov/kagi-summarizer-api.svg)](https://pkg.go.dev/github.com/sashabaranov/kagi-summarizer-api)
[![Go Report Card](https://goreportcard.com/badge/github.com/sashabaranov/go-gpt3)](https://goreportcard.com/report/github.com/sashabaranov/kagi-summarizer-api)[Kagi Universal Summarizer](https://labs.kagi.com/ai/sum) API wrapper for Go
Installation:
```
go get github.com/sashabaranov/kagi-summarizer-api
```Example usage:
```go
package mainimport (
"context"
"fmt"
kagi "github.com/sashabaranov/kagi-summarizer-api"
)func main() {
client := kagi.NewClient("your kagi token")
response, err := client.Summarize(
context.Background(),
SummaryRequest{
URL: "your url",
SummaryType: SummaryTypeSummary,
Engine: SummaryEngineAgnes,
Cache: true,
},
)
if err != nil {
fmt.Println("Error: ", err)
return
}
fmt.Println("Sumarry: ", response.Data.Output)
}```