Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OpenAIEmbedder ¶
type OpenAIEmbedder struct {
// contains filtered or unexported fields
}
func NewOpenAIEmbedder ¶ added in v0.2.2
func NewOpenAIEmbedder( apiKey, model, baseURL string, dimensions int, tp trace.TracerProvider, prop propagation.TextMapPropagator, ) *OpenAIEmbedder
NewOpenAIEmbedder constructs an OpenAIEmbedder with a local *http.Client whose transport is instrumented with otelhttp. The caller must supply a ParticipatingPropagator (already wrapped with WithNoBaggage) so that Inject is a no-op on untraced requests and Baggage is never forwarded to the third-party OpenAI endpoint, regardless of which propagation format is configured.
tp must be the scoped TracerProvider from BuildServer. prop must be the result of tracing.NewParticipatingPropagator(tracing.WithNoBaggage(configured)).
func (*OpenAIEmbedder) Dimension ¶
func (e *OpenAIEmbedder) Dimension() int
func (*OpenAIEmbedder) EmbedTexts ¶
func (*OpenAIEmbedder) ModelName ¶
func (e *OpenAIEmbedder) ModelName() string
Click to show internal directories.
Click to hide internal directories.