plugin

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewApp

NewApp creates a new example *App instance.

Types

type App

type App struct {
	backend.CallResourceHandler
	// contains filtered or unexported fields
}

App is an example app backend plugin which can respond to data queries.

func (*App) CheckHealth

CheckHealth handles health checks sent from Grafana to the plugin. It returns whether each feature is working based on the plugin settings.

func (*App) Dispose

func (a *App) Dispose()

Dispose here tells plugin SDK that plugin wants to clean up resources when a new instance created.

func (*App) RunStream

func (a *App) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

type EventDone

type EventDone struct {
	Done bool `json:"done"`
}

type EventError added in v0.3.0

type EventError struct {
	Error string `json:"error"`
}

type OpenAISettings

type OpenAISettings struct {
	URL            string         `json:"url"`
	OrganizationID string         `json:"organizationId"`
	Provider       openAIProvider `json:"provider"`
	AzureMapping   [][]string     `json:"azureModelMapping"`
	// contains filtered or unexported fields
}

type Settings

type Settings struct {
	OpenAI OpenAISettings `json:"openAI"`

	Vector vector.VectorSettings `json:"vector"`
}

Directories

Path Synopsis
package vector provides a service for searching vector embeddings.
package vector provides a service for searching vector embeddings.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL