diff --git a/src/pages/playground/apis/index.ts b/src/pages/playground/apis/index.ts index 8cb57c88..b47916ce 100644 --- a/src/pages/playground/apis/index.ts +++ b/src/pages/playground/apis/index.ts @@ -13,7 +13,7 @@ export const EMBEDDING_API = `/${OPENAI_COMPATIBLE}/embeddings`; export const OPENAI_MODELS = `/${OPENAI_COMPATIBLE}/models`; -export const RERANKER_API = '/rerank'; +export const RERANKER_API = `/${OPENAI_COMPATIBLE}/rerank`; export const AUDIO_TEXT_TO_SPEECH_API = `/${OPENAI_COMPATIBLE}/audio/speech`; diff --git a/src/pages/playground/components/ground-reranker.tsx b/src/pages/playground/components/ground-reranker.tsx index bf04a856..372b141c 100644 --- a/src/pages/playground/components/ground-reranker.tsx +++ b/src/pages/playground/components/ground-reranker.tsx @@ -1,6 +1,5 @@ import AlertInfo from '@/components/alert-info'; import SealInputNumber from '@/components/seal-form/input-number'; -import { OPENAI_COMPATIBLE } from '@/config/settings'; import useOverlayScroller from '@/hooks/use-overlay-scroller'; import useRequestToken from '@/hooks/use-request-token'; import { @@ -33,7 +32,7 @@ import React, { useState } from 'react'; import styled from 'styled-components'; -import { rerankerQuery } from '../apis'; +import { RERANKER_API, rerankerQuery } from '../apis'; import { extractErrorMessage } from '../config'; import { rerankerSamples } from '../config/samples'; import { ParamsSchema } from '../config/types'; @@ -202,7 +201,7 @@ const GroundReranker: React.FC = forwardRef((props, ref) => { const viewCodeContent = useMemo(() => { return generateRerankCode({ - api: `/${OPENAI_COMPATIBLE}/rerank`, + api: RERANKER_API, parameters: { ..._.pick(parameters, ['model', ..._.split(formFields, ',')]), query: queryValue,