mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-05-12 17:04:57 +00:00
* [ACS-8202] basic flow getting ai response for one or more selected files (#9944) * ACS-8202 Getting list of agents * ACS-8202 Mocked agents, used base api from hxi connector * ACS-8202 Search Ai service * ACS-8202 Small correction and mocked data * ACS-8202 Renamed variable * ACS-8202 Added documentation * ACS-8202 Addressed PR comments * ACS-8202 Type change * ACS-8202 Reverted unwatend change * ACS-8202 Reverted unwanted change * ACS-8201 Small correction after rebasing with Angular 15 * [ACS-8398] Unit tests for agents and search ai (#9974) * ACS-8398 Unit tests for search ai api and agents api * ACS-8398 Unit tests for getAnswer function from SearchAiApi, corrections for unit tests for SearchAiApi and AgentsApi * ACS-8398 Unit tests for SearchAiService and AgentService * [ACS-8210] Agent basic details popup (#9956) * [ACS-8573] Allow user to ask question without file selection * [ACS-8312] Display warning about losing response (#10059) * [ACS-8312] Display warning about losing response * [ACS-8312] Display warning about losing response - fixes * [ACS-8432] Sending all file types to HX instead of only the text file types (#10087) * ACS-8201 Fixed issues after rebase * [ACS-8588] Navigation is triggered twice when leaving Knowledge Retrieval page (#10132) * [ACS-8588] Navigation is triggered twice when leaving Knowledge Retrieval page * [ACS-8588] Navigation is triggered twice when leaving Knowledge Retrieval page - review fixes * [ACS-8588] Navigation is triggered twice when leaving Knowledge Retrieval page - review fixes 2 * [ACS-8399] Integrate all changes with backend (#10163) * Answers endpoint fix (#10176) * [ACS-8664] generic question redirection to hx insight (#10174) * ACS-8664 Loading HX insight url * ACS-8664 Added documentation for loading config of Knowledge Retrieval * ACS-8664 Unit tests * ACS-8664 Fixed unit tests * ACS-8664 Fixed unit tests after rebase * ACS-8664 Addressed comment * ACS-8201 Fixed issues after rebase * [ACS-8695] Getting Agent avatar (#10189) * [ACS-8695] Getting Agent avatar * [ACS-8695] Getting Agent avatar - on image load error * [ACS-8695] Getting Agent avatar - removed getAgentAvatar call (#10209) * [ACS-8201] Review fixes --------- Co-authored-by: AleksanderSklorz <115619721+AleksanderSklorz@users.noreply.github.com> Co-authored-by: Aleksander Sklorz <Aleksander.Sklorz@hyland.com>
44 lines
3.1 KiB
Markdown
44 lines
3.1 KiB
Markdown
---
|
|
Title: Search Ai service
|
|
Added: v7.0.0-alpha.3
|
|
Status: Active
|
|
Last reviewed: 2024-07-12
|
|
---
|
|
|
|
# [Search Ai service](../../../lib/content-services/src/lib/search-ai/services/search-ai.service.ts "Defined in search-ai.service.ts")
|
|
|
|
Manages search AI in Content Services.
|
|
|
|
<b>In order to use this service, you need to have the HX Insights Connector (additional ACS module) installed.</b>
|
|
|
|
## Class members
|
|
|
|
### Methods
|
|
|
|
- **updateSearchAiInputState**(state: `SearchAiInputState`): `void`<br/>
|
|
Update the state of the search AI input.
|
|
- _state:_ `SearchAiInputState` - The new state of the search AI input.
|
|
- **ask**(question: [`QuestionRequest`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#questionrequest)): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`QuestionModel`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#questionmodel)`>`<br/>
|
|
Ask a question to the AI.
|
|
- _question:_ [`QuestionRequest`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#questionrequest) - The question to ask.
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`QuestionModel`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#questionmodel)`>` - QuestionModel object containing information about questions.
|
|
- **getAnswer**(questionId: `string`): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AiAnswerEntry`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#aianswerentry)`>`<br/>
|
|
Get an answer to specific question.
|
|
- _questionId:_ `string` - The ID of the question to get an answer for.
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`AiAnswerEntry`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#aianswerentry)`>` - AiAnswerEntry object containing the answer.
|
|
- **getConfig**(): [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`KnowledgeRetrievalConfigEntry`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#knowledgeretrievalconfigentry)`>`<br/>
|
|
Get the knowledge retrieval configuration.
|
|
- **Returns** [`Observable`](http://reactivex.io/documentation/observable.html)`<`[`KnowledgeRetrievalConfigEntry`](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md#knowledgeretrievalconfigentry)`>` - KnowledgeRetrievalConfigEntry object containing the configuration.
|
|
- **checkSearchAvailability**(selectedNodesState: `SelectionState`, maxSelectedNodes: `number`): `string`<br/>
|
|
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](../../../lib/js-api/src/api/content-rest-api/docs/SearchAiApi.md) for more information about the types returned by [Search Ai
|
|
service](search-ai.service.md) methods and for the implementation of the REST API the service is
|
|
based on.
|