deepseek

package
v1.19.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 29, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package deepseek is the DeepSeek llm provider

Index

Constants

View Source
const BaseURL = "https://api.deepseek.com/v1"

based on https://api-docs.deepseek.com/

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// APIKey is the API key for deepseek
	APIKey string
	// Model is the model for deepseek
	// eg. "deepseek-chat", "deepseek-reasoner"
	Model string
	// contains filtered or unexported fields
}

Provider is the provider for deepseek

func NewProvider

func NewProvider(apiKey string, model string) *Provider

NewProvider creates a new deepseek ai provider

func (*Provider) GetChatCompletions

func (p *Provider) GetChatCompletions(ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M) (openai.ChatCompletionResponse, error)

GetChatCompletions implements ai.LLMProvider.

func (*Provider) GetChatCompletionsStream

func (p *Provider) GetChatCompletionsStream(ctx context.Context, req openai.ChatCompletionRequest, _ metadata.M) (provider.ResponseRecver, error)

GetChatCompletionsStream implements ai.LLMProvider.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the name of the provider

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL