1
0
mirror of https://github.com/fumiama/deepinfra.git synced 2026-06-05 00:32:46 +08:00
Go to file
2025-12-22 00:31:08 +08:00
2025-12-22 00:31:08 +08:00
2025-02-14 15:11:27 +09:00
2025-09-24 00:18:32 +08:00
2025-09-25 00:21:07 +08:00
2025-09-25 00:21:07 +08:00
2025-02-14 15:11:27 +09:00
2025-03-30 01:48:52 +09:00
2025-12-21 23:23:27 +08:00

deepinfra

Lightweight OpenAI/OLLaMA/GenAI compatible caller, originally designed for DeepInfra.

Quick Start

package main

import (
	"fmt"

	"github.com/fumiama/deepinfra"
	"github.com/fumiama/deepinfra/model"
)

func main() {
	api := deepinfra.NewAPI(deepinfra.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(model.NewContentText("Hello")),
	)
	if err != nil {
		panic(err)
	}
	fmt.Println(txt)
	// Hello! How can I assist you today?
}
Languages
Go 100%