Documentation
¶
Index ¶
- func ContextProvider(ctx context.Context, g *genkit.Genkit, policy AuthPolicy) (core.ContextProvider, error)
- func DefineRetriever(ctx context.Context, g *genkit.Genkit, cfg RetrieverOptions) (ai.Retriever, error)
- type AuthClient
- type AuthContext
- type AuthPolicy
- type Firebase
- type RetrieverOptions
- type VectorType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextProvider ¶ added in v0.3.0
func ContextProvider(ctx context.Context, g *genkit.Genkit, policy AuthPolicy) (core.ContextProvider, error)
ContextProvider creates a Firebase context provider for Genkit actions.
func DefineRetriever ¶ added in v0.5.2
func DefineRetriever(ctx context.Context, g *genkit.Genkit, cfg RetrieverOptions) (ai.Retriever, error)
DefineRetriever defines a Retriever with the given configuration.
Types ¶
type AuthClient ¶
AuthClient is a client for the Firebase Auth service.
type AuthContext ¶ added in v0.3.0
AuthContext is the context of an authenticated request.
type AuthPolicy ¶ added in v0.3.0
type AuthPolicy = func(context.Context, AuthContext, json.RawMessage) error
AuthPolicy is a function that validates an incoming request.
type Firebase ¶ added in v0.5.2
type Firebase struct {
ProjectId string // Firebase project ID.
App *firebasev4.App // Firebase app instance.
// contains filtered or unexported fields
}
Firebase FireStore passes configuration options to the plugin.
type RetrieverOptions ¶ added in v0.3.0
type RetrieverOptions struct {
Name string // Name of the retriever
Label string // Label for the retriever
Collection string // Firestore collection name
Embedder ai.Embedder // Embedder instance for generating embeddings
VectorField string // Field name for storing vectors
MetadataFields []string // List of metadata fields to retrieve
ContentField string // Field name for storing content
Limit int // Limit on the number of results
DistanceMeasure firestore.DistanceMeasure // Distance measure for vector similarity
}
RetrieverOptions struct for retriever configuration
type VectorType ¶ added in v0.3.0
type VectorType int
Click to show internal directories.
Click to hide internal directories.