chore: embedding model

This commit is contained in:
jialin
2024-07-31 14:47:54 +08:00
parent cfdc731313
commit cca047c7c4
4 changed files with 22 additions and 9 deletions
+5 -2
View File
@@ -11,6 +11,9 @@ export async function execChatCompletions(params: any) {
});
}
export const queryModelsList = async () => {
return request(`${OPENAI_MODELS}`);
export const queryModelsList = async (params: any) => {
return request(`${OPENAI_MODELS}`, {
method: 'GET',
params
});
};
@@ -43,7 +43,10 @@ const ParamsSettings: React.FC<ParamsSettingsProps> = ({
useEffect(() => {
const getModelList = async () => {
try {
const res = await queryModelsList();
const params = {
embedding_only: false
};
const res = await queryModelsList(params);
const list = _.map(res.data || [], (item: any) => {
return {
value: item.id,