package
Version:
v0.0.0-...-b43dce5
Opens a new window with list of versions in this module.
Published: Nov 8, 2024
License: Apache-2.0
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package ollama provies handlers that proxies
ollama API calls to Gemini models.
type EmbedRequest struct {
Model string `json:"model,omitempty"`
Input []string `json:"input,omitempty"`
}
type EmbedResponse struct {
Model string `json:"model,omitempty"`
Embeddings [][]float32 `json:"embeddings,omitempty"`
}
type GenerateRequest struct {
Model string `json:"model,omitempty"`
Prompt string `json:"prompt,omitempty"`
Suffix string `json:"suffix,omitempty"`
Options Options `json:"options,omitempty"`
System string `json:"system,omitempty"`
}
type GenerateResponse struct {
Model string `json:"model,omitempty"`
Response string `json:"response,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
PromptEvalCount int32 `json:"prompt_eval_count,omitempty"`
EvalCount int32 `json:"eval_count,omitempty"`
Done bool `json:"done,omitempty"`
}
type Options struct {
Temperature *float32 `json:"temperature,omitempty"`
Stop *string `json:"stop,omitempty"`
NumPredict *int32 `json:"num_predict,omitempty"`
TopK *int32 `json:"top_k,omitempty"`
TopP *float32 `json:"top_p,omitempty"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.