|
@@ -360,12 +360,7 @@ export const generateChatCompletion = async (token: string = '', body: object) =
|
|
|
return [res, controller];
|
|
|
};
|
|
|
|
|
|
-export const createModel = async (
|
|
|
- token: string,
|
|
|
- tagName: string,
|
|
|
- content: string,
|
|
|
- urlIdx: string | null = null
|
|
|
-) => {
|
|
|
+export const createModel = async (token: string, payload: object, urlIdx: string | null = null) => {
|
|
|
let error = null;
|
|
|
|
|
|
const res = await fetch(
|
|
@@ -377,10 +372,7 @@ export const createModel = async (
|
|
|
'Content-Type': 'application/json',
|
|
|
Authorization: `Bearer ${token}`
|
|
|
},
|
|
|
- body: JSON.stringify({
|
|
|
- name: tagName,
|
|
|
- modelfile: content
|
|
|
- })
|
|
|
+ body: JSON.stringify(payload)
|
|
|
}
|
|
|
).catch((err) => {
|
|
|
error = err;
|