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