Skip to content

Commit f6bae13

Browse files
kgowruKapil GowruKapil Gowru
authored
Scribe issue turbopuffer (#219)
Co-authored-by: Kapil Gowru <[email protected]> Co-authored-by: Kapil Gowru <[email protected]>
1 parent f811a5b commit f6bae13

File tree

1 file changed

+9
-28
lines changed

1 file changed

+9
-28
lines changed

β€Ž.github/scripts/fern-scribe.jsβ€Ž

Lines changed: 9 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -390,33 +390,6 @@ class FernScribe {
390390
}
391391
}
392392

393-
async createEmbedding(text) {
394-
try {
395-
// Using OpenAI's embedding model
396-
const response = await fetch('https://api.openai.com/v1/embeddings', {
397-
method: 'POST',
398-
headers: {
399-
'Authorization': `Bearer ${process.env.OPENAI_API_KEY}`,
400-
'Content-Type': 'application/json'
401-
},
402-
body: JSON.stringify({
403-
model: 'text-embedding-3-small',
404-
input: text
405-
})
406-
});
407-
408-
if (!response.ok) {
409-
throw new Error(`Embedding API error: ${response.status}`);
410-
}
411-
412-
const data = await response.json();
413-
return data.data[0]?.embedding;
414-
} catch (error) {
415-
console.error('Embedding creation failed:', error);
416-
return null;
417-
}
418-
}
419-
420393
async getFernDocsStructure() {
421394
try {
422395
const response = await fetch('https://buildwithfern.com/learn/llms.txt');
@@ -639,6 +612,11 @@ ${context.additionalContext ? `**Additional Context:** ${context.additionalConte
639612
if (context.slackThread) {
640613
console.log('πŸ“± Fetching Slack thread content...');
641614
slackThreadContent = await this.fetchSlackThread(context.slackThread);
615+
console.log('πŸ“± Slack thread content length:', slackThreadContent.length);
616+
console.log('πŸ“± Full Slack thread content:');
617+
console.log('--- SLACK THREAD START ---');
618+
console.log(slackThreadContent);
619+
console.log('--- SLACK THREAD END ---');
642620
}
643621

644622
// Create enhanced query text that includes both request description and Slack context
@@ -650,7 +628,10 @@ ${context.additionalContext ? `**Additional Context:** ${context.additionalConte
650628

651629
// Debug logging
652630
console.log('πŸ” Enhanced query length:', enhancedQuery.length);
653-
console.log('πŸ” Enhanced query preview:', enhancedQuery.substring(0, 500) + '...');
631+
console.log('πŸ” Full enhanced query:');
632+
console.log('--- ENHANCED QUERY START ---');
633+
console.log(enhancedQuery);
634+
console.log('--- ENHANCED QUERY END ---');
654635
console.log('πŸ” Namespace:', process.env.TURBOPUFFER_NAMESPACE || 'default');
655636

656637
// Query TurboBuffer for relevant files

0 commit comments

Comments
Β (0)