Skip to content

Commit d9171b2

Browse files
committed
Handle missing history correctly
1 parent 7224871 commit d9171b2

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

dist/openai.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/openai.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/openai.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ function compressContent( text: string, removeCodeBlocks = true ): string {
113113
* @param history - previous conversation history with the bot
114114
* @returns assembled prompt
115115
*/
116-
function assemblePrompt( question: string, mostSimilar: Embedding[], history: string ): string {
116+
function assemblePrompt( question: string, mostSimilar: Embedding[], history = '' ): string {
117117
history = compressContent( history, false );
118118
return PROMPT_TEMPLATE
119119
.replace( '{{files}}', mostSimilar.map( x => {

0 commit comments

Comments
 (0)