Attempt trigger process call server side
This commit is contained in:
parent
73bf7f3d79
commit
a62e39a776
8 changed files with 21 additions and 16 deletions
|
@ -1,11 +1,11 @@
|
|||
import { Message } from '@/components/ChatWindow';
|
||||
import process from 'process';
|
||||
import { getServerEnv } from '@/lib/serverEnvironment';
|
||||
|
||||
export const getSuggestions = async (chatHisory: Message[]) => {
|
||||
const chatModel = localStorage.getItem('chatModel');
|
||||
const chatModelProvider = localStorage.getItem('chatModelProvider');
|
||||
|
||||
const res = await fetch(`${process.env.BACKEND_API_URL}/suggestions`, {
|
||||
const res = await fetch(`${getServerEnv("BACKEND_API_URL")}/suggestions`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue