[WEB-1559] chore: make AI assistant endpoint workspace level (#4770)
* chore: make ai assistant endpoint workspace level * chore: create workspace level ai assistant endpoint
This commit is contained in:
parent
f4ceaaf01c
commit
aa92ace57f
10 changed files with 90 additions and 41 deletions
|
|
@ -10,8 +10,8 @@ export class AIService extends APIService {
|
|||
super(API_BASE_URL);
|
||||
}
|
||||
|
||||
async createGptTask(workspaceSlug: string, projectId: string, data: { prompt: string; task: string }): Promise<any> {
|
||||
return this.post(`/api/workspaces/${workspaceSlug}/projects/${projectId}/ai-assistant/`, data)
|
||||
async createGptTask(workspaceSlug: string, data: { prompt: string; task: string }): Promise<any> {
|
||||
return this.post(`/api/workspaces/${workspaceSlug}/ai-assistant/`, data)
|
||||
.then((response) => response?.data)
|
||||
.catch((error) => {
|
||||
throw error?.response;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue