Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BestOfSequence ¶
type Client ¶
type Client struct {
*delphiclient.Client
}
func (*Client) Generate ¶
func (c *Client) Generate(ctx context.Context, inferenceRequest GenerateInferenceRequest) (GeneratedInferenceResponse, error)
func (*Client) HealthCheck ¶
func (c *Client) HealthCheck(ctx context.Context) (*ErrorResponse, error)
type ErrorResponse ¶
type GenerateInferenceRequest ¶
type GenerateInferenceRequest struct { Inputs string `json:"inputs"` Parameters InferenceGenerationParameters `json:"parameters"` }
type GeneratedInferenceResponse ¶
type GeneratedInferenceResponse struct { Details GeneratedInferenceResponseDetails `json:"details"` GeneratedInference string `json:"generated_text"` }
func (*GeneratedInferenceResponse) ConcatenateTokens ¶
func (resp *GeneratedInferenceResponse) ConcatenateTokens() string
type GeneratedInferenceResponseDetails ¶
type GeneratedInferenceResponseDetails struct { BestOfSequences []BestOfSequence `json:"best_of_sequences"` FinishReason string `json:"finish_reason"` GeneratedTokens int `json:"generated_tokens"` Prefill []PrefillElement `json:"prefill"` Seed int `json:"seed"` Tokens []Token `json:"tokens"` }
type InferenceGenerationParameters ¶
type InferenceGenerationParameters struct { BestOf int `json:"best_of"` DecoderInputeDetails bool `json:"decoder_input_details"` Details bool `json:"details"` DoSample bool `json:"do_sample"` MaxNewTokens int `json:"max_new_tokens"` RepetitionPenalty float32 `json:"repetition_penalty"` ReturnFullText bool `json:"return_full_text"` Seed *string `json:"seed"` // verify type of this example value was null Stop []string `json:"stop"` Temperature float32 `json:"temperature"` TopK float32 `json:"top_k"` // verify type, example vaulue was int but peers were floats TopP float32 `json:"top_p"` Truncate *string `json:"truncate"` // verify type of this example value was null TypicalP float32 `json:"typical_p"` Watermark bool `json:"watermark"` }
type PrefillElement ¶
Click to show internal directories.
Click to hide internal directories.