aistudio

package
v0.0.0-...-cdc1604 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AiStudio

type AiStudio struct {
	// contains filtered or unexported fields
}

func New

func New(opts ...Opt) (*AiStudio, error)

func (*AiStudio) ChatCompletion

func (p *AiStudio) ChatCompletion(ctx context.Context, llm internal.Adapter, requester llmberjack.Requester) (*llmberjack.InnerResponse, error)

func (*AiStudio) CloseThread

func (p *AiStudio) CloseThread(threadId *llmberjack.ThreadId)

func (*AiStudio) CopyThread

func (p *AiStudio) CopyThread(threadId *llmberjack.ThreadId) *llmberjack.ThreadId

func (*AiStudio) Init

func (p *AiStudio) Init(adapter internal.Adapter) error

func (*AiStudio) RequestOptionsType

func (*AiStudio) RequestOptionsType() reflect.Type

func (*AiStudio) ResetThread

func (p *AiStudio) ResetThread(threadId *llmberjack.ThreadId)

type Opt

type Opt func(*AiStudio)

func WithApiKey

func WithApiKey(apiKey string) Opt

func WithBackend

func WithBackend(backend genai.Backend) Opt

WithBackend represents which Google GenAI backend to use (VertexAI or Gemini).

It only accepts values of `genai.GeminiAPI` or `genai.VertexAI`.

func WithDefaultModel

func WithDefaultModel(model string) Opt

func WithLocation

func WithLocation(location string) Opt

WithLocation defines the Google Cloud Platform region to use to connect to VertexAI.

It is only taken into account when using the VertexAI backend.

func WithProject

func WithProject(project string) Opt

WithProject defines the Google Cloud Platform project to use to connect to VertexAI.

It is only taken into account when using the VertexAI backend.

type RequestOptions

type RequestOptions struct {
	GoogleSearch *bool
	TopK         *float64
	Thinking     *ThinkingConfig
}

func (RequestOptions) ProviderRequestOptions

func (RequestOptions) ProviderRequestOptions()

type ThinkingConfig

type ThinkingConfig struct {
	IncludeThoughts bool
	ThinkingLevel   string
}

Jump to

Keyboard shortcuts

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