You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			21 lines
		
	
	
		
			426 B
		
	
	
	
		
			TypeScript
		
	
			
		
		
	
	
			21 lines
		
	
	
		
			426 B
		
	
	
	
		
			TypeScript
		
	
import type { GenericAbortSignal } from 'axios'
 | 
						|
import { post } from '@/utils/request'
 | 
						|
 | 
						|
export function fetchChatAPI<T = any>(
 | 
						|
  prompt: string,
 | 
						|
  options?: { conversationId?: string; parentMessageId?: string },
 | 
						|
  signal?: GenericAbortSignal,
 | 
						|
) {
 | 
						|
  return post<T>({
 | 
						|
    url: '/chat',
 | 
						|
    data: { prompt, options },
 | 
						|
    signal,
 | 
						|
  })
 | 
						|
}
 | 
						|
 | 
						|
export function fetchChatConfig<T = any>() {
 | 
						|
  return post<T>({
 | 
						|
    url: '/config',
 | 
						|
  })
 | 
						|
}
 |