Skip to content

Commit

Permalink
Revert "Add generativeDirectAnswer service (#263)" (#265)
Browse files Browse the repository at this point in the history
This reverts commit e2fe1fd.
  • Loading branch information
anguyen-yext2 authored Jun 26, 2024
1 parent e2fe1fd commit 54b5cc7
Show file tree
Hide file tree
Showing 44 changed files with 14 additions and 755 deletions.
11 changes: 0 additions & 11 deletions docs/search-core.endpoints.generativedirectanswer.md

This file was deleted.

1 change: 0 additions & 1 deletion docs/search-core.endpoints.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ export interface Endpoints
| Property | Type | Description |
| --- | --- | --- |
| [filterSearch?](./search-core.endpoints.filtersearch.md) | string | <i>(Optional)</i> |
| [generativeDirectAnswer?](./search-core.endpoints.generativedirectanswer.md) | string | <i>(Optional)</i> |
| [questionSubmission?](./search-core.endpoints.questionsubmission.md) | string | <i>(Optional)</i> |
| [status?](./search-core.endpoints.status.md) | string | <i>(Optional)</i> |
| [universalAutocomplete?](./search-core.endpoints.universalautocomplete.md) | string | <i>(Optional)</i> |
Expand Down
23 changes: 0 additions & 23 deletions docs/search-core.generativedirectanswerrequest.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-core.generativedirectanswerrequest.results.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-core.generativedirectanswerrequest.searchid.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-core.generativedirectanswerrequest.searchterm.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-core.generativedirectanswerresponse.citations.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-core.generativedirectanswerresponse.directanswer.md

This file was deleted.

22 changes: 0 additions & 22 deletions docs/search-core.generativedirectanswerresponse.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/search-core.generativedirectanswerresponse.resultstatus.md

This file was deleted.

24 changes: 0 additions & 24 deletions docs/search-core.generativedirectanswerservice.generateanswer.md

This file was deleted.

20 changes: 0 additions & 20 deletions docs/search-core.generativedirectanswerservice.md

This file was deleted.

3 changes: 0 additions & 3 deletions docs/search-core.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,6 @@
| [FieldValueStaticFilter](./search-core.fieldvaluestaticfilter.md) | A [FieldValueFilter](./search-core.fieldvaluefilter.md) with the kind of filter specified to discriminate between static filter types. |
| [FilterSearchRequest](./search-core.filtersearchrequest.md) | Options for a filtersearch request. |
| [FilterSearchResponse](./search-core.filtersearchresponse.md) | The response of a filtersearch request. |
| [GenerativeDirectAnswerRequest](./search-core.generativedirectanswerrequest.md) | Options which can be specified for a generative direct answer request. |
| [GenerativeDirectAnswerResponse](./search-core.generativedirectanswerresponse.md) | A representation of a generative direct answer response. |
| [GenerativeDirectAnswerService](./search-core.generativedirectanswerservice.md) | A service for generative direct answer requests. |
| [HighlightedValue](./search-core.highlightedvalue.md) | A field value and its substring matches as emphasized by the Search API. |
| [HolidayHours](./search-core.holidayhours.md) | An interface for holiday hours to use in [BaseFieldValueDirectAnswer.value](./search-core.basefieldvaluedirectanswer.value.md)<!-- -->. |
| [Hours](./search-core.hours.md) | An interface for hours fields to use in [BaseFieldValueDirectAnswer.value](./search-core.basefieldvaluedirectanswer.value.md)<!-- -->. |
Expand Down
3 changes: 1 addition & 2 deletions docs/search-core.searchcore._constructor_.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Constructs a new instance of the `SearchCore` class
<b>Signature:</b>

```typescript
constructor(searchService: SearchService, questionSubmissionService: QuestionSubmissionService, autoCompleteService: AutocompleteService, generativeDirectAnswerService: GenerativeDirectAnswerService);
constructor(searchService: SearchService, questionSubmissionService: QuestionSubmissionService, autoCompleteService: AutocompleteService);
```

## Parameters
Expand All @@ -19,5 +19,4 @@ constructor(searchService: SearchService, questionSubmissionService: QuestionSub
| searchService | [SearchService](./search-core.searchservice.md) | |
| questionSubmissionService | [QuestionSubmissionService](./search-core.questionsubmissionservice.md) | |
| autoCompleteService | [AutocompleteService](./search-core.autocompleteservice.md) | |
| generativeDirectAnswerService | [GenerativeDirectAnswerService](./search-core.generativedirectanswerservice.md) | |

28 changes: 0 additions & 28 deletions docs/search-core.searchcore.generativedirectanswer.md

This file was deleted.

3 changes: 1 addition & 2 deletions docs/search-core.searchcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ export declare class SearchCore

| Constructor | Modifiers | Description |
| --- | --- | --- |
| [(constructor)(searchService, questionSubmissionService, autoCompleteService, generativeDirectAnswerService)](./search-core.searchcore._constructor_.md) | | Constructs a new instance of the <code>SearchCore</code> class |
| [(constructor)(searchService, questionSubmissionService, autoCompleteService)](./search-core.searchcore._constructor_.md) | | Constructs a new instance of the <code>SearchCore</code> class |

## Methods

| Method | Modifiers | Description |
| --- | --- | --- |
| [filterSearch(request)](./search-core.searchcore.filtersearch.md) | | Performs a filtersearch request against specified fields within a single vertical. |
| [generativeDirectAnswer(request)](./search-core.searchcore.generativedirectanswer.md) | | Performs a generative direct answer request. |
| [submitQuestion(request)](./search-core.searchcore.submitquestion.md) | | Submits a custom question to the Search API. |
| [universalAutocomplete(request)](./search-core.searchcore.universalautocomplete.md) | | Performs an autocomplete request across all verticals. |
| [universalSearch(request)](./search-core.searchcore.universalsearch.md) | | Performs a search across all verticals. |
Expand Down
24 changes: 1 addition & 23 deletions etc/search-core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@ export interface Endpoints {
// (undocumented)
filterSearch?: string;
// (undocumented)
generativeDirectAnswer?: string;
// (undocumented)
questionSubmission?: string;
// (undocumented)
status?: string;
Expand Down Expand Up @@ -379,25 +377,6 @@ export interface FilterSearchResponse {
uuid: string;
}

// @public
export interface GenerativeDirectAnswerRequest extends SearchRequest {
results: VerticalResults[];
searchId: string;
searchTerm: string;
}

// @public
export interface GenerativeDirectAnswerResponse {
citations: string[];
directAnswer: string;
resultStatus: string;
}

// @public
export interface GenerativeDirectAnswerService {
generateAnswer(request: GenerativeDirectAnswerRequest): Promise<GenerativeDirectAnswerResponse>;
}

// @public
export type HighlightedFields = {
[fieldId: string]: HighlightedValue | HighlightedValue[] | HighlightedFields | HighlightedFields[];
Expand Down Expand Up @@ -670,9 +649,8 @@ export interface SearchConfigWithToken extends BaseSearchConfig {

// @public
export class SearchCore {
constructor(searchService: SearchService, questionSubmissionService: QuestionSubmissionService, autoCompleteService: AutocompleteService, generativeDirectAnswerService: GenerativeDirectAnswerService);
constructor(searchService: SearchService, questionSubmissionService: QuestionSubmissionService, autoCompleteService: AutocompleteService);
filterSearch(request: FilterSearchRequest): Promise<FilterSearchResponse>;
generativeDirectAnswer(request: GenerativeDirectAnswerRequest): Promise<GenerativeDirectAnswerResponse>;
submitQuestion(request: QuestionSubmissionRequest): Promise<QuestionSubmissionResponse>;
universalAutocomplete(request: UniversalAutocompleteRequest): Promise<AutocompleteResponse>;
universalSearch(request: UniversalSearchRequest): Promise<UniversalSearchResponse>;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@yext/search-core",
"version": "2.6.0-beta",
"version": "2.5.1",
"description": "Typescript Networking Library for the Yext Search API",
"main": "./dist/commonjs/src/index.js",
"module": "./dist/esm/src/index.js",
Expand Down
19 changes: 1 addition & 18 deletions src/SearchCore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ import { UniversalAutocompleteRequest, VerticalAutocompleteRequest, FilterSearch
import { AutocompleteResponse, FilterSearchResponse } from './models/autocompleteservice/AutocompleteResponse';
import { AutocompleteService } from './services/AutocompleteService';

import { GenerativeDirectAnswerRequest } from './models/generativedirectanswer/GenerativeDirectAnswerRequest';
import { GenerativeDirectAnswerResponse } from './models/generativedirectanswer/GenerativeDirectAnswerResponse';
import { GenerativeDirectAnswerService } from './services/GenerativeDirectAnswerService';

/**
* Provides methods for executing searches, submitting questions, and performing autocompletes.
*
Expand All @@ -25,8 +21,7 @@ export class SearchCore {
constructor(
private searchService: SearchService,
private questionSubmissionService: QuestionSubmissionService,
private autoCompleteService: AutocompleteService,
private generativeDirectAnswerService: GenerativeDirectAnswerService,
private autoCompleteService: AutocompleteService
) {}

/**
Expand Down Expand Up @@ -107,16 +102,4 @@ export class SearchCore {
filterSearch(request: FilterSearchRequest): Promise<FilterSearchResponse> {
return this.autoCompleteService.filterSearch(request);
}

/**
* Performs a generative direct answer request.
*
* @remarks
* If rejected, the reason will be an {@link SearchError}.
*
* @param request - Generative direct answer request options
*/
generativeDirectAnswer(request: GenerativeDirectAnswerRequest): Promise<GenerativeDirectAnswerResponse> {
return this.generativeDirectAnswerService.generateAnswer(request);
}
}
Loading

0 comments on commit 54b5cc7

Please sign in to comment.