mirror of
				https://github.com/ItzCrazyKns/Perplexica.git
				synced 2025-11-03 20:28:14 +00:00 
			
		
		
		
	feat(http-headers): add Content-Type
				
					
				
			This commit is contained in:
		@@ -36,6 +36,11 @@ const useSocket = (url: string) => {
 | 
			
		||||
        ) {
 | 
			
		||||
          const providers = await fetch(
 | 
			
		||||
            `${process.env.NEXT_PUBLIC_API_URL}/models`,
 | 
			
		||||
            {
 | 
			
		||||
              headers: {
 | 
			
		||||
                'Content-Type': 'application/json',
 | 
			
		||||
              },
 | 
			
		||||
            },
 | 
			
		||||
          ).then(async (res) => await res.json());
 | 
			
		||||
 | 
			
		||||
          const chatModelProviders = providers.chatModelProviders;
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,11 @@ const SettingsDialog = ({
 | 
			
		||||
    if (isOpen) {
 | 
			
		||||
      const fetchConfig = async () => {
 | 
			
		||||
        setIsLoading(true);
 | 
			
		||||
        const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`);
 | 
			
		||||
        const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/config`, {
 | 
			
		||||
          headers: {
 | 
			
		||||
            'Content-Type': 'application/json',
 | 
			
		||||
          },
 | 
			
		||||
        });
 | 
			
		||||
        const data = await res.json();
 | 
			
		||||
        setConfig(data);
 | 
			
		||||
        setIsLoading(false);
 | 
			
		||||
@@ -251,7 +255,7 @@ const SettingsDialog = ({
 | 
			
		||||
                        </>
 | 
			
		||||
                      )}
 | 
			
		||||
                    {/* Embedding models */}
 | 
			
		||||
                    {config.chatModelProviders && (
 | 
			
		||||
                    {config.embeddingModelProviders && (
 | 
			
		||||
                      <div className="flex flex-col space-y-1">
 | 
			
		||||
                        <p className="text-white/70 text-sm">
 | 
			
		||||
                          Embedding model Provider
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user