mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
- Ability to provide custom instructions to captain <img width="1107" alt="Screenshot 2025-04-28 at 6 11 43 PM" src="https://github.com/user-attachments/assets/f94cbccc-b4d8-48fd-b6b9-55524129bc50" />
27 lines
585 B
JavaScript
27 lines
585 B
JavaScript
/* global axios */
|
|
import ApiClient from '../ApiClient';
|
|
|
|
class CaptainAssistant extends ApiClient {
|
|
constructor() {
|
|
super('captain/assistants', { accountScoped: true });
|
|
}
|
|
|
|
get({ page = 1, searchKey } = {}) {
|
|
return axios.get(this.url, {
|
|
params: {
|
|
page,
|
|
searchKey,
|
|
},
|
|
});
|
|
}
|
|
|
|
playground({ assistantId, messageContent, messageHistory }) {
|
|
return axios.post(`${this.url}/${assistantId}/playground`, {
|
|
message_content: messageContent,
|
|
message_history: messageHistory,
|
|
});
|
|
}
|
|
}
|
|
|
|
export default new CaptainAssistant();
|