phind

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ModelPhindV1 = "phind"

Variables

This section is empty.

Functions

func ListModels

func ListModels() []string

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cookies []*http.Cookie) *Client

func (*Client) CreateChatCompletion

func (p *Client) CreateChatCompletion(ctx context.Context, req llm.ChatCompletionRequest) (llm.ChatCompletionResponse, error)

func (*Client) CreateChatCompletionStream

func (p *Client) CreateChatCompletionStream(ctx context.Context, req llm.ChatCompletionRequest, dataChan chan llm.ChatCompletionStreamResponse, errChan chan error)

func (*Client) CreateCompletion

func (p *Client) CreateCompletion(ctx context.Context, payload *Request, respChan chan llm.ChatCompletionStreamResponse, errChan chan error)

func (*Client) ListModels

func (p *Client) ListModels() []string

type Phind

type Phind struct {
	*llm.LLM
}

func New

func New(cookies []*http.Cookie, dao llm.Dao) *Phind

type Request

type Request struct {
	UserInput      string `json:"userInput"`
	Messages       any    `json:"messages"`
	PinnedMessages any    `json:"pinnedMessages"`
	AnonUserID     string `json:"anonUserID"`
}

func (*Request) FromChatCompletionRequest

func (r *Request) FromChatCompletionRequest(req llm.ChatCompletionRequest)

Jump to

Keyboard shortcuts

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