mirror of
https://github.com/fumiama/deepinfra.git
synced 2026-06-05 08:40:32 +08:00
16 lines
411 B
Markdown
16 lines
411 B
Markdown
# deepinfra
|
|
Call OpenAI/OLLaMA/GenAI compatible APIs, originally designed for DeepInfra.
|
|
|
|
## Quick Start
|
|
```go
|
|
api := NewAPI(OpenAIDeepInfra, "PUT YOUR API KEY HERE")
|
|
txt, err := api.Request(model.NewOpenAI(model.ModelDeepDeek, model.SeparatorThink, 0.7, 0.9, 1024).
|
|
System("Be a good assistant.").User("Hello"),
|
|
)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
fmt.Println(txt)
|
|
// Hello! How can I assist you today?
|
|
```
|