mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-11-03 20:28:14 +00:00 
			
		
		
		
	feat(agents): update types
This commit is contained in:
		@@ -66,7 +66,7 @@ const basicAcademicSearchResponsePrompt = `
 | 
			
		||||
const strParser = new StringOutputParser();
 | 
			
		||||
 | 
			
		||||
const handleStream = async (
 | 
			
		||||
  stream: AsyncGenerator<StreamEvent, any, unknown>,
 | 
			
		||||
  stream: IterableReadableStream<StreamEvent>,
 | 
			
		||||
  emitter: eventEmitter,
 | 
			
		||||
) => {
 | 
			
		||||
  for await (const event of stream) {
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ const basicRedditSearchResponsePrompt = `
 | 
			
		||||
const strParser = new StringOutputParser();
 | 
			
		||||
 | 
			
		||||
const handleStream = async (
 | 
			
		||||
  stream: AsyncGenerator<StreamEvent, any, unknown>,
 | 
			
		||||
  stream: IterableReadableStream<StreamEvent>,
 | 
			
		||||
  emitter: eventEmitter,
 | 
			
		||||
) => {
 | 
			
		||||
  for await (const event of stream) {
 | 
			
		||||
 
 | 
			
		||||
@@ -22,6 +22,7 @@ import logger from '../utils/logger';
 | 
			
		||||
import LineListOutputParser from '../lib/outputParsers/listLineOutputParser';
 | 
			
		||||
import { getDocumentsFromLinks } from '../lib/linkDocument';
 | 
			
		||||
import LineOutputParser from '../lib/outputParsers/lineOutputParser';
 | 
			
		||||
import { IterableReadableStream } from '@langchain/core/utils/stream';
 | 
			
		||||
 | 
			
		||||
const basicSearchRetrieverPrompt = `
 | 
			
		||||
You will be given a conversation below and a follow up question. You need to rephrase the follow-up question if needed so it is a standalone question that can be used by the LLM to search the web for information.
 | 
			
		||||
@@ -95,7 +96,7 @@ const basicWebSearchResponsePrompt = `
 | 
			
		||||
const strParser = new StringOutputParser();
 | 
			
		||||
 | 
			
		||||
const handleStream = async (
 | 
			
		||||
  stream: AsyncGenerator<StreamEvent, any, unknown>,
 | 
			
		||||
  stream:  IterableReadableStream<StreamEvent>,
 | 
			
		||||
  emitter: eventEmitter,
 | 
			
		||||
) => {
 | 
			
		||||
  for await (const event of stream) {
 | 
			
		||||
 
 | 
			
		||||
@@ -65,7 +65,7 @@ const basicWolframAlphaSearchResponsePrompt = `
 | 
			
		||||
const strParser = new StringOutputParser();
 | 
			
		||||
 | 
			
		||||
const handleStream = async (
 | 
			
		||||
  stream: AsyncGenerator<StreamEvent, any, unknown>,
 | 
			
		||||
  stream: IterableReadableStream<StreamEvent>,
 | 
			
		||||
  emitter: eventEmitter,
 | 
			
		||||
) => {
 | 
			
		||||
  for await (const event of stream) {
 | 
			
		||||
 
 | 
			
		||||
@@ -19,7 +19,7 @@ Since you are a writing assistant, you would not perform web searches. If you th
 | 
			
		||||
const strParser = new StringOutputParser();
 | 
			
		||||
 | 
			
		||||
const handleStream = async (
 | 
			
		||||
  stream: AsyncGenerator<StreamEvent, any, unknown>,
 | 
			
		||||
  stream: IterableReadableStream<StreamEvent>,
 | 
			
		||||
  emitter: eventEmitter,
 | 
			
		||||
) => {
 | 
			
		||||
  for await (const event of stream) {
 | 
			
		||||
 
 | 
			
		||||
@@ -66,7 +66,7 @@ const basicYoutubeSearchResponsePrompt = `
 | 
			
		||||
const strParser = new StringOutputParser();
 | 
			
		||||
 | 
			
		||||
const handleStream = async (
 | 
			
		||||
  stream: AsyncGenerator<StreamEvent, any, unknown>,
 | 
			
		||||
  stream: IterableReadableStream<StreamEvent>,
 | 
			
		||||
  emitter: eventEmitter,
 | 
			
		||||
) => {
 | 
			
		||||
  for await (const event of stream) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user