Fix endpoint
This commit is contained in:
		
							parent
							
								
									a51cea24d4
								
							
						
					
					
						commit
						867c6d7e33
					
				
							
								
								
									
										2
									
								
								.env
								
								
								
								
							
							
						
						
									
										2
									
								
								.env
								
								
								
								
							| 
						 | 
					@ -1,4 +1,4 @@
 | 
				
			||||||
# Uncomment the following line to use the mocked API
 | 
					# Uncomment the following line to use the mocked API
 | 
				
			||||||
#VITE_API_BASE=http://localhost:5174
 | 
					#VITE_API_BASE=http://localhost:5174
 | 
				
			||||||
#VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions
 | 
					#VITE_ENDPOINT_COMPLETIONS=/v1/chat/completions
 | 
				
			||||||
#VITE_ENDPOINT_COMPLETIONS=/v1/models
 | 
					#VITE_ENDPOINT_MODELS=/v1/models
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -2,7 +2,7 @@
 | 
				
			||||||
  // This makes it possible to override the OpenAI API base URL in the .env file
 | 
					  // This makes it possible to override the OpenAI API base URL in the .env file
 | 
				
			||||||
  const apiBase = import.meta.env.VITE_API_BASE || 'https://api.openai.com'
 | 
					  const apiBase = import.meta.env.VITE_API_BASE || 'https://api.openai.com'
 | 
				
			||||||
  const endpointCompletions = import.meta.env.VITE_ENDPOINT_COMPLETIONS || '/v1/chat/completions'
 | 
					  const endpointCompletions = import.meta.env.VITE_ENDPOINT_COMPLETIONS || '/v1/chat/completions'
 | 
				
			||||||
  const endpointModels = import.meta.env.VITE_ENDPOINT_COMPLETIONS || '/v1/models'
 | 
					  const endpointModels = import.meta.env.VITE_ENDPOINT_MODELS || '/v1/models'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  export const getApiBase = ():string => apiBase
 | 
					  export const getApiBase = ():string => apiBase
 | 
				
			||||||
  export const getEndpointCompletions = ():string => endpointCompletions
 | 
					  export const getEndpointCompletions = ():string => endpointCompletions
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue