mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-04-27 09:26:23 +02:00
add auth for copilot and agents
This commit is contained in:
parent
cdc96e7ce3
commit
ad4ea23d79
14 changed files with 173 additions and 43 deletions
|
|
@ -504,6 +504,7 @@ export async function getCopilotResponse(
|
|||
body: JSON.stringify(request),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${process.env.COPILOT_API_KEY}`,
|
||||
},
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
|
|
|||
|
|
@ -162,11 +162,12 @@ export async function getAgenticApiResponse(
|
|||
}> {
|
||||
// call agentic api
|
||||
console.log(`agentic request`, JSON.stringify(request, null, 2));
|
||||
const response = await fetch(process.env.AGENTIC_API_URL + '/chat', {
|
||||
const response = await fetch(process.env.AGENTS_API_URL + '/chat', {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(request),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
'Authorization': `Bearer ${process.env.AGENTS_API_KEY}`,
|
||||
},
|
||||
});
|
||||
if (!response.ok) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue