Skip to content

Commit

Permalink
provide title when using AI prompt to summarize
Browse files Browse the repository at this point in the history
  • Loading branch information
eric2788 committed Oct 27, 2024
1 parent daa1838 commit e0b2376
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tabs/summarizer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function App() {
const llmSettings = await getSettingStorage('settings.llm')
const llm = createLLMProvider(llmSettings)
llm.on('progress', (p, t) => setProgressText(() => p < 1 ? t : ''))
const summaryStream = llm.promptStream(`这位是一名在b站直播间直播的日本vtuber说过的话,请根据下文对话猜测与观众的互动内容,并用中文总结一下他们的对话:\n\n${danmakus.join('\n')}`)
const summaryStream = llm.promptStream(`这位是一名在b站直播间直播的日本vtuber说过的话,其标题为${title},请根据下文对话猜测与观众的互动内容,并用中文总结一下他们的对话:\n\n${danmakus.join('\n')}`)
for await (const words of summaryStream) {
if (llm.cumulative) {
setSummary(summary => summary === loadingText ? words : summary + words)
Expand Down

0 comments on commit e0b2376

Please sign in to comment.