Skip to content

Commit

Permalink
fix: prompt dont have website data
Browse files Browse the repository at this point in the history
  • Loading branch information
OnFireByte committed Aug 17, 2023
1 parent 44b72da commit e315453
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/chatgpt/chatgpt.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,14 @@ export class ChatgptService {
htmlString = dom.window.document.getElementById('readme').textContent;
}

let message = CHAT_GPT_PROMPT + '\n\n' + url;
'\n\n' + this.parsingService.getAllPlainText(htmlString).slice(2000);
let message =
CHAT_GPT_PROMPT +
'\n\n' +
url +
'\n\n' +
this.parsingService.getAllPlainText(htmlString).slice(0, 2000);

console.log(message);

try {
const resp = await axios.post<ChatGPTResponse>(
Expand Down

0 comments on commit e315453

Please sign in to comment.