No auth on root route for health checks, fix suggestions request

This commit is contained in:
Hristo 2024-05-30 11:18:31 -04:00
parent 0ac971e6b4
commit f7c3bc2823
5 changed files with 25 additions and 6 deletions

View file

@ -1,10 +1,11 @@
import { Message } from '@/components/ChatWindow';
import { clientFetch } from '@/lib/utils';
export const getSuggestions = async (chatHisory: Message[]) => {
const chatModel = localStorage.getItem('chatModel');
const chatModelProvider = localStorage.getItem('chatModelProvider');
const res = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/suggestions`, {
const res = await clientFetch('/suggestions', {
method: 'POST',
headers: {
'Content-Type': 'application/json',