Documentation
¶
Index ¶
Constants ¶
View Source
const ( ContentTypeJSON = "application/json" ContentTypeStreamJSON = "application/stream+json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chat ¶ added in v1.1.0
type Chat struct {
Response
model.NonStreamedChat
model.StreamedChat
// contains filtered or unexported fields
}
func (*Chat) AcceptContentType ¶ added in v1.1.0
func (*Chat) SetAcceptContentType ¶ added in v1.1.0
func (*Chat) SetStreamCallback ¶ added in v1.1.1
func (c *Chat) SetStreamCallback(callback restclientgo.StreamCallback)
func (*Chat) StreamCallback ¶ added in v1.1.1
func (c *Chat) StreamCallback() restclientgo.StreamCallback
type Classify ¶
type Classify struct {
Response
ID string `json:"id"`
Classifications []model.Classification `json:"classifications"`
}
func (*Classify) AcceptContentType ¶
type DetectLanguage ¶
type DetectLanguage struct {
Response
Results []model.DetectLanguageResult `json:"results"`
}
func (*DetectLanguage) AcceptContentType ¶
func (d *DetectLanguage) AcceptContentType() string
type Detokenize ¶
func (*Detokenize) AcceptContentType ¶
func (d *Detokenize) AcceptContentType() string
type Embed ¶
type Embed struct {
Response
ID string `json:"id"`
Embeddings [][]float64 `json:"embeddings"`
Texts []string `json:"texts"`
}
func (*Embed) AcceptContentType ¶
type Generate ¶
type Generate struct {
Response
ID string `json:"id"`
Prompt *string `json:"prompt"`
Generations []model.Generation `json:"generations"`
}
func (*Generate) AcceptContentType ¶
type Rerank ¶
type Rerank struct {
Response
Results []model.RerankResult `json:"results"`
}
func (*Rerank) AcceptContentType ¶
type Response ¶
type Response struct {
Meta model.Meta `json:"meta,omitempty"`
Headers Headers `json:"-"`
Code int `json:"-"`
RawBody *string `json:"-"`
}
func (*Response) SetHeaders ¶
func (r *Response) SetHeaders(headers restclientgo.Headers) error
func (*Response) SetStatusCode ¶
type Summarize ¶
func (*Summarize) AcceptContentType ¶
Click to show internal directories.
Click to hide internal directories.