-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add generativeDirectAnswer service (#263)
J=CLIP-1226 TEST=auto,manual Co-authored-by: Yen Truong <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
- Loading branch information
1 parent
e6a87d9
commit e2fe1fd
Showing
44 changed files
with
755 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [Endpoints](./search-core.endpoints.md) > [generativeDirectAnswer](./search-core.endpoints.generativedirectanswer.md) | ||
|
||
## Endpoints.generativeDirectAnswer property | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
generativeDirectAnswer?: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) | ||
|
||
## GenerativeDirectAnswerRequest interface | ||
|
||
Options which can be specified for a generative direct answer request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface GenerativeDirectAnswerRequest extends SearchRequest | ||
``` | ||
<b>Extends:</b> [SearchRequest](./search-core.searchrequest.md) | ||
## Properties | ||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [results](./search-core.generativedirectanswerrequest.results.md) | [VerticalResults](./search-core.verticalresults.md)<!-- -->\[\] | The complete set of Search Results | | ||
| [searchId](./search-core.generativedirectanswerrequest.searchid.md) | string | The ID of the search request. | | ||
| [searchTerm](./search-core.generativedirectanswerrequest.searchterm.md) | string | The text of the user-written query that prompted Search results. | | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) > [results](./search-core.generativedirectanswerrequest.results.md) | ||
|
||
## GenerativeDirectAnswerRequest.results property | ||
|
||
The complete set of Search Results | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
results: VerticalResults[]; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-core.generativedirectanswerrequest.searchid.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) > [searchId](./search-core.generativedirectanswerrequest.searchid.md) | ||
|
||
## GenerativeDirectAnswerRequest.searchId property | ||
|
||
The ID of the search request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
searchId: string; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-core.generativedirectanswerrequest.searchterm.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) > [searchTerm](./search-core.generativedirectanswerrequest.searchterm.md) | ||
|
||
## GenerativeDirectAnswerRequest.searchTerm property | ||
|
||
The text of the user-written query that prompted Search results. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
searchTerm: string; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-core.generativedirectanswerresponse.citations.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md) > [citations](./search-core.generativedirectanswerresponse.citations.md) | ||
|
||
## GenerativeDirectAnswerResponse.citations property | ||
|
||
An array of uids from the relevant [Result.rawData](./search-core.result.rawdata.md) that were used to form the directAnswer. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
citations: string[]; | ||
``` |
13 changes: 13 additions & 0 deletions
13
docs/search-core.generativedirectanswerresponse.directanswer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md) > [directAnswer](./search-core.generativedirectanswerresponse.directanswer.md) | ||
|
||
## GenerativeDirectAnswerResponse.directAnswer property | ||
|
||
The text of the final generated response. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
directAnswer: string; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md) | ||
|
||
## GenerativeDirectAnswerResponse interface | ||
|
||
A representation of a generative direct answer response. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface GenerativeDirectAnswerResponse | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Type | Description | | ||
| --- | --- | --- | | ||
| [citations](./search-core.generativedirectanswerresponse.citations.md) | string\[\] | An array of uids from the relevant [Result.rawData](./search-core.result.rawdata.md) that were used to form the directAnswer. | | ||
| [directAnswer](./search-core.generativedirectanswerresponse.directanswer.md) | string | The text of the final generated response. | | ||
| [resultStatus](./search-core.generativedirectanswerresponse.resultstatus.md) | string | A string representing whether there was a result found within the given invocation. | | ||
|
13 changes: 13 additions & 0 deletions
13
docs/search-core.generativedirectanswerresponse.resultstatus.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md) > [resultStatus](./search-core.generativedirectanswerresponse.resultstatus.md) | ||
|
||
## GenerativeDirectAnswerResponse.resultStatus property | ||
|
||
A string representing whether there was a result found within the given invocation. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
resultStatus: string; | ||
``` |
24 changes: 24 additions & 0 deletions
24
docs/search-core.generativedirectanswerservice.generateanswer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerService](./search-core.generativedirectanswerservice.md) > [generateAnswer](./search-core.generativedirectanswerservice.generateanswer.md) | ||
|
||
## GenerativeDirectAnswerService.generateAnswer() method | ||
|
||
Generates an answer to a search query. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
generateAnswer(request: GenerativeDirectAnswerRequest): Promise<GenerativeDirectAnswerResponse>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| request | [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) | | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<[GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md)<!-- -->> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [GenerativeDirectAnswerService](./search-core.generativedirectanswerservice.md) | ||
|
||
## GenerativeDirectAnswerService interface | ||
|
||
A service for generative direct answer requests. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
export interface GenerativeDirectAnswerService | ||
``` | ||
|
||
## Methods | ||
|
||
| Method | Description | | ||
| --- | --- | | ||
| [generateAnswer(request)](./search-core.generativedirectanswerservice.generateanswer.md) | Generates an answer to a search query. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-core](./search-core.md) > [SearchCore](./search-core.searchcore.md) > [generativeDirectAnswer](./search-core.searchcore.generativedirectanswer.md) | ||
|
||
## SearchCore.generativeDirectAnswer() method | ||
|
||
Performs a generative direct answer request. | ||
|
||
<b>Signature:</b> | ||
|
||
```typescript | ||
generativeDirectAnswer(request: GenerativeDirectAnswerRequest): Promise<GenerativeDirectAnswerResponse>; | ||
``` | ||
|
||
## Parameters | ||
|
||
| Parameter | Type | Description | | ||
| --- | --- | --- | | ||
| request | [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) | Generative direct answer request options | | ||
|
||
<b>Returns:</b> | ||
|
||
Promise<[GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md)<!-- -->> | ||
|
||
## Remarks | ||
|
||
If rejected, the reason will be an [SearchError](./search-core.searcherror.md)<!-- -->. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.