Versions in this module Expand all Collapse all v0 v0.0.4 Sep 25, 2023 v0.0.3 Sep 21, 2023 v0.0.2 Sep 21, 2023 v0.0.1 Sep 19, 2023 Changes in this version + var ErrEmptyResponse = errors.New("empty response") + var ErrInvalidToken = errors.New("invalid token") + var ErrUnexpectedStatusCode = errors.New("unexpected status code") + type Client struct + Model string + Token string + func New(token string, model string) (*Client, error) + func (c *Client) CreateEmbedding(ctx context.Context, model string, task string, r *EmbeddingRequest) ([][]float64, error) + func (c *Client) RunInference(ctx context.Context, request *InferenceRequest) (*InferenceResponse, error) + type EmbeddingRequest struct + Inputs []string + Options map[string]any + type InferenceRequest struct + MaxLength int + MinLength int + Model string + Prompt string + RepetitionPenalty float64 + Seed int + Task InferenceTask + Temperature float64 + TopK int + TopP float64 + type InferenceResponse struct + Text string + type InferenceTask string + const InferenceTaskText2TextGeneration + const InferenceTaskTextGeneration