mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
feat: support messages to ask AI (#1380)
This commit is contained in:
@ -250,16 +250,8 @@ export function deleteIdentityProvider(id: IdentityProviderId) {
|
||||
return axios.delete(`/api/idp/${id}`);
|
||||
}
|
||||
|
||||
export function postChatCompletion(prompt: string) {
|
||||
return axios.post<ResponseObject<string>>(`/api/openai/chat-completion`, {
|
||||
prompt,
|
||||
});
|
||||
}
|
||||
|
||||
export function postTextCompletion(prompt: string) {
|
||||
return axios.post<ResponseObject<string>>(`/api/openai/text-completion`, {
|
||||
prompt,
|
||||
});
|
||||
export function postChatCompletion(messages: any[]) {
|
||||
return axios.post<ResponseObject<string>>(`/api/openai/chat-completion`, messages);
|
||||
}
|
||||
|
||||
export function checkOpenAIEnabled() {
|
||||
|
Reference in New Issue
Block a user