Documentation ¶
Index ¶
- Constants
- func GetErrorObjectQuery(errorObj *model.ErrorObject) string
- func MatchErrorTag(ctx context.Context, db *gorm.DB, c Client, query string) ([]*modelInputs.MatchedErrorTag, error)
- type Client
- type EmbeddingType
- type HuggingfaceModelClient
- func (c *HuggingfaceModelClient) GetEmbeddings(ctx context.Context, errors []*model.ErrorObject) ([]*model.ErrorObjectEmbeddings, error)
- func (c *HuggingfaceModelClient) GetErrorTagEmbedding(ctx context.Context, title string, description string) (*model.ErrorTag, error)
- func (c *HuggingfaceModelClient) GetStringEmbedding(ctx context.Context, input string) ([]float32, error)
- type HuggingfaceModelInputs
- type OpenAIClient
Constants ¶
View Source
const InferenceTimeout = 5 * time.Second
InferenceTimeout is max time to do inference in case api is slow. p95 ~ 0.3s
Variables ¶
This section is empty.
Functions ¶
func GetErrorObjectQuery ¶
func GetErrorObjectQuery(errorObj *model.ErrorObject) string
func MatchErrorTag ¶
func MatchErrorTag(ctx context.Context, db *gorm.DB, c Client, query string) ([]*modelInputs.MatchedErrorTag, error)
Types ¶
type Client ¶
type Client interface { GetEmbeddings(ctx context.Context, errors []*model.ErrorObject) ([]*model.ErrorObjectEmbeddings, error) GetErrorTagEmbedding(ctx context.Context, title string, description string) (*model.ErrorTag, error) GetStringEmbedding(ctx context.Context, text string) ([]float32, error) }
type EmbeddingType ¶
type EmbeddingType string
const CombinedEmbedding EmbeddingType = "CombinedEmbedding"
const EventEmbedding EmbeddingType = "EventEmbedding"
const PayloadEmbedding EmbeddingType = "PayloadEmbedding"
const StackTraceEmbedding EmbeddingType = "StackTraceEmbedding"
type HuggingfaceModelClient ¶
type HuggingfaceModelClient struct {
// contains filtered or unexported fields
}
func (*HuggingfaceModelClient) GetEmbeddings ¶
func (c *HuggingfaceModelClient) GetEmbeddings(ctx context.Context, errors []*model.ErrorObject) ([]*model.ErrorObjectEmbeddings, error)
func (*HuggingfaceModelClient) GetErrorTagEmbedding ¶
func (*HuggingfaceModelClient) GetStringEmbedding ¶
type HuggingfaceModelInputs ¶
type HuggingfaceModelInputs struct {
Inputs string `json:"inputs"`
}
type OpenAIClient ¶
type OpenAIClient struct {
// contains filtered or unexported fields
}
func (*OpenAIClient) GetEmbeddings ¶
func (c *OpenAIClient) GetEmbeddings(ctx context.Context, errors []*model.ErrorObject) ([]*model.ErrorObjectEmbeddings, error)
Click to show internal directories.
Click to hide internal directories.