github.com/TScafeJR/genai/gemini/v1
No package summary is available.
Package
Files: 4. Third party imports: 4. Imports from organisation: 0. Tests: 0. Benchmarks: 0.
Vars
Types
Cfg
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Logger |
|
No comment on field. |
| ApiKey |
|
No comment on field. |
| RateLimit |
|
No comment on field. |
| Models |
|
No comment on field. |
GeminiClient
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| logger |
|
No comment on field. |
| client |
|
No comment on field. |
| rateLimiter |
|
No comment on field. |
| mu |
|
No comment on field. |
| models |
|
No comment on field. |
Models
This type doesn't have documentation.
| Field name | Field type | Comment |
|---|---|---|
| Text |
|
No comment on field. |
| MultiModal |
|
No comment on field. |
Functions
func NewGeminiClient
Uses: context.Background, fmt.Errorf, genai.NewClient, option.WithAPIKey, rate.Limit, rate.NewLimiter, ratelimit.RateLimit.
func (*GeminiClient) Close
func (*GeminiClient) CreateEmbedding
Uses: fmt.Errorf, zap.Any.
func (*GeminiClient) GenerateContent
Uses: classifier.Classification, fmt.Errorf, genai.GenerativeModel, zap.Any.
func (Cfg) Validate
Uses: fmt.Errorf.
Private functions
func cleanPrompt
References: classifier.Prompt.
func getTextFromPart
References: genai.Text.
func toGenAIPrompt
References: genai.ImageData, genai.Part, genai.Text.
func limit
References: fmt.Errorf.