add openai assistant

This commit is contained in:
Henry
2023-11-07 20:45:25 +00:00
parent 12fb5a3a3b
commit 0f293e5a59
24 changed files with 1443 additions and 21 deletions
+25
View File
@@ -0,0 +1,25 @@
import client from './client'
const getAllAssistants = () => client.get('/assistants')
const getSpecificAssistant = (id) => client.get(`/assistants/${id}`)
const getAssistantObj = (id, credential) => client.get(`/openai-assistants/${id}?credential=${credential}`)
const getAllAvailableAssistants = (credential) => client.get(`/openai-assistants?credential=${credential}`)
const createNewAssistant = (body) => client.post(`/assistants`, body)
const updateAssistant = (id, body) => client.put(`/assistants/${id}`, body)
const deleteAssistant = (id) => client.delete(`/assistants/${id}`)
export default {
getAllAssistants,
getSpecificAssistant,
getAssistantObj,
getAllAvailableAssistants,
createNewAssistant,
updateAssistant,
deleteAssistant
}