Fix captioning URL: base + '/messages'
This commit is contained in:
parent
3e1d44fc29
commit
4de9176f1a
|
@ -9,7 +9,8 @@ router.post('/caption-image', jsonParser, async (request, response) => {
|
||||||
try {
|
try {
|
||||||
const mimeType = request.body.image.split(';')[0].split(':')[1];
|
const mimeType = request.body.image.split(';')[0].split(':')[1];
|
||||||
const base64Data = request.body.image.split(',')[1];
|
const base64Data = request.body.image.split(',')[1];
|
||||||
const url = request.body.reverse_proxy ? request.body.reverse_proxy : 'https://api.anthropic.com/v1/messages';
|
const baseUrl = request.body.reverse_proxy ? request.body.reverse_proxy : 'https://api.anthropic.com/v1';
|
||||||
|
const url = `${baseUrl}/messages`;
|
||||||
const body = {
|
const body = {
|
||||||
model: request.body.model,
|
model: request.body.model,
|
||||||
messages: [
|
messages: [
|
||||||
|
|
Loading…
Reference in New Issue