mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-11-04 04:38:15 +00:00 
			
		
		
		
	feat(search): add optional systemInstructions to API request body
This commit is contained in:
		@@ -34,6 +34,7 @@ interface ChatRequestBody {
 | 
			
		||||
  query: string;
 | 
			
		||||
  history: Array<[string, string]>;
 | 
			
		||||
  stream?: boolean;
 | 
			
		||||
  systemInstructions?: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export const POST = async (req: Request) => {
 | 
			
		||||
@@ -125,7 +126,7 @@ export const POST = async (req: Request) => {
 | 
			
		||||
      embeddings,
 | 
			
		||||
      body.optimizationMode,
 | 
			
		||||
      [],
 | 
			
		||||
      '',
 | 
			
		||||
      body.systemInstructions || '',
 | 
			
		||||
    );
 | 
			
		||||
 | 
			
		||||
    if (!body.stream) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user