mirror of
https://github.com/arc53/DocsGPT.git
synced 2025-11-30 00:53:14 +00:00
fix for sending sources + azure embeddings issue
This commit is contained in:
@@ -28,6 +28,10 @@ export function fetchAnswerApi(
|
||||
selectedDocs.model +
|
||||
'/';
|
||||
}
|
||||
//in history array remove all keys except prompt and response
|
||||
history = history.map((item) => {
|
||||
return { prompt: item.prompt, response: item.response };
|
||||
});
|
||||
|
||||
return fetch(apiHost + '/api/answer', {
|
||||
method: 'POST',
|
||||
@@ -82,6 +86,10 @@ export function fetchAnswerSteaming(
|
||||
'/';
|
||||
}
|
||||
|
||||
history = history.map((item) => {
|
||||
return { prompt: item.prompt, response: item.response };
|
||||
});
|
||||
|
||||
return new Promise<Answer>((resolve, reject) => {
|
||||
const url = new URL(apiHost + '/stream');
|
||||
url.searchParams.append('question', question);
|
||||
|
||||
Reference in New Issue
Block a user