Skip to content

Commit

Permalink
fix inference API types
Browse files Browse the repository at this point in the history
  • Loading branch information
walterra committed Aug 22, 2024
1 parent d765c2a commit c14a218
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { FormattedMessage } from '@kbn/i18n-react';
import { cloneDeep } from 'lodash';
import useDebounce from 'react-use/lib/useDebounce';
import type {
InferenceModelConfigContainer,
InferenceInferenceEndpointInfo,
MappingTypeMapping,
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
import { createSemanticTextCombinedField, getFieldNames, getNameCollisionMsg } from './utils';
Expand Down Expand Up @@ -61,14 +61,14 @@ export const SemanticTextForm: FC<Props> = ({ addCombinedField, hasNameCollision

useEffect(() => {
http
.fetch<InferenceModelConfigContainer[]>('/internal/data_visualizer/inference_services', {
.fetch<InferenceInferenceEndpointInfo[]>('/internal/data_visualizer/inference_services', {
method: 'GET',
version: '1',
})
.then((response) => {
const inferenceServiceOptions = response.map((service) => ({
value: service.model_id,
text: service.model_id,
value: service.inference_id,
text: service.inference_id,
}));
setInferenceServices(inferenceServiceOptions);
setSelectedInference(inferenceServiceOptions[0]?.value ?? undefined);
Expand Down

0 comments on commit c14a218

Please sign in to comment.