Documentation
¶
Index ¶
Constants ¶
View Source
const ( SearchResultsProp = "search_results" SearchQueryProp = "search_query" )
Variables ¶
This section is empty.
Functions ¶
func InitEmbeddingsSearch ¶
func InitEmbeddingsSearch(db *sqlx.DB, httpClient *http.Client, cfg embeddings.EmbeddingSearchConfig, licenseChecker *enterprise.LicenseChecker) (embeddings.EmbeddingSearch, error)
InitEmbeddingsSearch creates and initializes the embedding search system
Types ¶
type RAGResult ¶
type RAGResult struct {
PostID string `json:"postId"`
ChannelID string `json:"channelId"`
ChannelName string `json:"channelName"`
UserID string `json:"userId"`
Username string `json:"username"`
Content string `json:"content"`
Score float32 `json:"score"`
}
RAGResult represents an enriched search result with metadata
type Request ¶
type Request struct {
Query string `json:"query"`
TeamID string `json:"teamId"`
ChannelID string `json:"channelId"`
MaxResults int `json:"maxResults"`
}
Request represents a search query request
type Response ¶
type Response struct {
Answer string `json:"answer"`
Results []RAGResult `json:"results"`
PostID string `json:"postId,omitempty"`
ChannelID string `json:"channelId,omitempty"`
}
Response represents a response to a search query
type Search ¶
type Search struct {
embeddings.EmbeddingSearch
// contains filtered or unexported fields
}
func New ¶
func New( search embeddings.EmbeddingSearch, mmclient mmapi.Client, prompts *llm.Prompts, streamingService streaming.Service, licenseChecker *enterprise.LicenseChecker, ) *Search
Click to show internal directories.
Click to hide internal directories.