straico-custom-provider
Version:
Straico custom provider for Vercel AI SDK
34 lines (31 loc) • 835 B
JavaScript
const axios = require('axios');
const data = JSON.stringify({
"models": [
"anthropic/claude-3-haiku:beta",
"openai/gpt-3.5-turbo-0125"
],
"message": "Which key terms from the 100-word space document also appear in the YouTube video about the universe?",
"file_urls": [
"https://prompt-rack.s3.amazonaws.com/api/1721329178731_space_words.csv"
],
"youtube_urls": [
"https://www.youtube.com/watch?v=zORUUqJd81M"
]
});
const config = {
method: 'post',
maxBodyLength: Number.POSITIVE_INFINITY,
url: 'https://api.straico.com/v1/prompt/completion',
headers: {
'Authorization': 'Bearer $STRAICO_API_KEY',
'Content-Type': 'application/json'
},
data : data
};
axios(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});