Skip to content

Latest commit

 

History

History
43 lines (35 loc) · 3.12 KB

search-ai.service.md

File metadata and controls

43 lines (35 loc) · 3.12 KB
Title Added Status Last reviewed
Search Ai service
v7.0.0-alpha.3
Active
2024-07-12

Manages search AI in Content Services.

In order to use this service, you need to have the HX Insights Connector (additional ACS module) installed.

Class members

Methods

  • updateSearchAiInputState(state: SearchAiInputState): void
    Update the state of the search AI input.
    • state: SearchAiInputState - The new state of the search AI input.
  • ask(question: QuestionRequest): Observable<QuestionModel>
    Ask a question to the AI.
  • getAnswer(questionId: string): Observable<AiAnswerEntry>
    Get an answer to specific question.
    • questionId: string - The ID of the question to get an answer for.
    • Returns Observable<AiAnswerEntry> - AiAnswerEntry object containing the answer.
  • getConfig(): Observable<KnowledgeRetrievalConfigEntry>
    Get the knowledge retrieval configuration.
  • checkSearchAvailability(selectedNodesState: SelectionState, maxSelectedNodes: number): string
    Check if using of search is possible (if all conditions are met).
    • selectedNodesState: SelectionState - information about selected nodes.
    • maxSelectedNodes: number - max number of selected nodes. Default 100.
    • Returns string - string with error if any condition is not met, empty string otherwise.

Details

See the Search Ai API for more information about the types returned by Search Ai service methods and for the implementation of the REST API the service is based on.