initial commit

This commit is contained in:
2026-07-31 14:21:48 +03:00
commit 92ceb8bec3
22 changed files with 3104 additions and 0 deletions
+49
View File
@@ -0,0 +1,49 @@
# GoDeepSeek
## Requirements:
- CGO enabled
- x86_64 CPU with AVX2 (Intel Haswell 2013+, AMD Ryzen 2017+)
- C++17 compiler (GCC 7+, Clang 5+, MSVC 2017+)
## Quick start
```go
package main
import (
"context"
"deepseek"
"log"
)
func main() {
ctx := context.Background()
ds := deepseek.NewClient()
ds.SetDeviceIDProvider(deepseek.RandomDeviceIDProvider())
// Flow #1
err := ds.Login("email", "password")
if err != nil {
panic(err)
}
// Flow #2
ds.SetToken("TOKEN")
chatRes, err := ds.CreateChatWithContext(ctx)
if err != nil {
panic(err)
}
res, err := ds.CompletionWithContext(ctx, *deepseek.NewCompletionReq(chatRes.ID).SetPrompt("Hello"))
if err != nil {
panic(err)
}
str, err := ds.ReadStreamAsString(ctx, res)
if err != nil {
panic(err)
}
log.Println(str)
}
```