Removed some of the calls to process.env; Used server props instead
This commit is contained in:
parent
376220b26e
commit
f51f36a411
5 changed files with 52 additions and 11 deletions
|
@ -1,11 +1,10 @@
|
|||
import { Message } from '@/components/ChatWindow';
|
||||
import process from 'process';
|
||||
|
||||
export const getSuggestions = async (chatHisory: Message[]) => {
|
||||
export const getSuggestions = async (chatHisory: Message[], backendApiUrl: string) => {
|
||||
const chatModel = localStorage.getItem('chatModel');
|
||||
const chatModelProvider = localStorage.getItem('chatModelProvider');
|
||||
|
||||
const res = await fetch(`${process.env.BACKEND_API_URL}/suggestions`, {
|
||||
const res = await fetch(`${backendApiUrl}/suggestions`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue