I get an error in the console — Uncaught (in promise) Error: Failed to fetch chat completion
my github repo
https://github.com/zapboy216/Ai-redwood
const App = () => (
<CopilotKit url="src/api/copilotkit/">
<CopilotSidebar
labels={{
title: 'Your Assistant',
initial: 'Hi! 👋 How can I assist you today?',
}}
>
<FatalErrorBoundary page={FatalErrorPage}>
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
<RedwoodApolloProvider>
<Routes />
</RedwoodApolloProvider>
</RedwoodProvider>
</FatalErrorBoundary>
</CopilotSidebar>
</CopilotKit>
)
1 Like
tried moving URL around as well as api/copilotkit directory current App Component
import { CopilotKit } from '@copilotkit/react-core' // Import required components
import { CopilotSidebar } from '@copilotkit/react-ui'
import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web'
import { RedwoodApolloProvider } from '@redwoodjs/web/apollo'
import FatalErrorPage from 'src/pages/FatalErrorPage'
import Routes from 'src/Routes'
import '@copilotkit/react-ui/styles.css' // Import the CSS for CopilotKit
import './index.css'
const App = () => (
<CopilotKit url="api/copilotkit">
<CopilotSidebar>
<FatalErrorBoundary page={FatalErrorPage}>
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
<RedwoodApolloProvider>
<Routes />
</RedwoodApolloProvider>
</RedwoodProvider>
</FatalErrorBoundary>
</CopilotSidebar>
</CopilotKit>
)
export default App