1
0
mirror of https://github.com/coalaura/whiskr.git synced 2025-09-09 01:09:54 +00:00

initial commit

This commit is contained in:
Laura
2025-08-05 03:56:23 +02:00
commit 4b40053ce9
27 changed files with 1287 additions and 0 deletions

22
openrouter.go Normal file
View File

@@ -0,0 +1,22 @@
package main
import (
"context"
"github.com/revrost/go-openrouter"
)
func OpenRouterClient() *openrouter.Client {
return openrouter.NewClient(OpenRouterToken)
}
func OpenRouterStartStream(ctx context.Context, request openrouter.ChatCompletionRequest) (*openrouter.ChatCompletionStream, error) {
client := OpenRouterClient()
stream, err := client.CreateChatCompletionStream(ctx, request)
if err != nil {
return nil, err
}
return stream, nil
}