request

package
v0.0.0-...-5c42bcd Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatCompletion

type ChatCompletion struct {
	Model       string        `json:"model"`
	Messages    []ChatMessage `json:"messages"`
	Stream      bool          `json:"stream"`
	Temperature float32       `json:"temperature"`
	TopP        float32       `json:"top_p"`
	//N                int           `json:"n"`
	MaxTokens int `json:"max_tokens"`
	//Stop             string        `json:"stop"`
	PresencePenalty float32 `json:"presence_penalty"`
	//FrequencyPenalty float32       `json:"frequency_penalty"`
	User string `json:"user"`
}

ChatCompletion OpenAI的参数列表

type ChatHistory

type ChatHistory struct {
	Uuid   uint   `json:"uuid"`
	Title  string `json:"title"`
	IsEdit bool   `json:"isEdit"`
}

type ChatMessage

type ChatMessage struct {
	Role    string `json:"role"`
	Content string `json:"content"`
}

type ChatReq

type ChatReq struct {
	Prompt           string `form:"prompt" json:"prompt"`
	ConversationId   *uint  `form:"conversationId" json:"conversationId"`
	ConversationType *uint  `form:"conversationType" json:"conversationType"`
	PromptId         uint   `form:"promptId" json:"promptId"`
	StandardAlone    uint   `form:"standardAlone" json:"standardAlone"`
	Sign             string `form:"sign" json:"sign"`
}

ChatReq 请求参数列表

type Choices

type Choices struct {
	Delta        Delta  `json:"delta"`
	Index        int    `json:"index"`
	FinishReason string `json:"finish_reason"`
}

type ConversationDataGroups

type ConversationDataGroups struct {
	Data []map[string]interface{} `json:"data"`
	Uuid uint                     `json:"uuid"`
}

type ConversationRecordSearch

type ConversationRecordSearch struct {
	openfish.ConversationRecord
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type ConversationSearch

type ConversationSearch struct {
	openfish.Conversation
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type Delta

type Delta struct {
	Content string `json:"content"`
	Role    string `json:"role"`
}

type EventStreamResult

type EventStreamResult struct {
	Id      string    `json:"id"`
	Object  string    `json:"object"`
	Created uint      `json:"created"`
	Model   string    `json:"model"`
	Choices []Choices `json:"choices"`
}

type FeedbackSearch

type FeedbackSearch struct {
	openfish.Feedback
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type MailAccountSearch

type MailAccountSearch struct {
	openfish.MailAccount
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type PromptSearch

type PromptSearch struct {
	openfish.Prompt
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

type SecretKeySearch

type SecretKeySearch struct {
	openfish.SecretKey
	StartCreatedAt *time.Time `json:"startCreatedAt" form:"startCreatedAt"`
	EndCreatedAt   *time.Time `json:"endCreatedAt" form:"endCreatedAt"`
	request.PageInfo
}

Jump to

Keyboard shortcuts

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