Hi, I’m trying to submit requests to the completions API using a fine-tuned model. However, I’m always getting a 400 Bad Request.
I’m send the model ID in the format davinci:ft-XXXX, which I got from the List Models API.
It works fine with base models. (Just to make sure payload is correct)
Could you please help me?
Thanks in advance!
Hey @castroalves is this issue still present?
hello, getting a 401 bad request with axios
i am also unable to post to the endpoint…help me out
const express = require (“express”);
require(‘dotenv’).config();
const cors = require(“cors”);
const bodyParser = require(“body-parser”)
const{configuration, OpenAIApi, Configuration}= require(“openai”);
// setting up the server
const app = express()
app.use(bodyParser.json());
app.use(cors())
// setting up the ChartGpt endpoint
const apiKey = process.env.CHATBOT_KEY
const configuration = new Configuration((
apiKey
));
const openai = new OpenAIApi(configuration);
app.axios.post("/v1", async(req, res)=>{
const {prompt} = req.body;
const completion = await openai.createCompletion({
model: "text-davinci-003",
prompt: prompt,
max_tokens: 4097,
});
res.send(completion.data.choices[0].text);
});
const port = completion;
app.listen(port, ()=> {
console.log(`Server listening on port ${port}`)
console.log(`https://api.openai.com/v1:${port}`);
})