Go API Documentation

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

*zap.Logger

No comment on field.
ApiKey

string

No comment on field.
RateLimit

*ratelimit.RateLimit

No comment on field.
Models

Models

No comment on field.

GeminiClient

This type doesn't have documentation.

Field name Field type Comment
logger

*zap.Logger

No comment on field.
client

*genai.Client

No comment on field.
rateLimiter

*rate.Limiter

No comment on field.
mu

sync.Mutex

No comment on field.
models

Models

No comment on field.

Models

This type doesn't have documentation.

Field name Field type Comment
Text

string

No comment on field.
MultiModal

string

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.