#Unrecognized request arrangment

9 messages · Page 1 of 1 (latest)

hollow obsidian
#
Error: {
  message: 'Unrecognized request argument supplied: examples',
  type: 'invalid_request_error',
  param: null,
  code: null
}
#

I am facing this error

#

My code : ```js
const fs = require('fs');
const axios = require('axios');

const data = [
{ prompt: "Hi", completion: "How may I assist you with Neverlands? Feel free to ask me anything about Neverlands Minecraft and our Discord server." },
{ prompt: "What is the IP of the server?", completion: "The IP address of the Neverlands Minecraft server is play.neverlands.fun" },
{ prompt: "Does this server support Bedrock edition?", completion: "No, Neverlands does not currently support the Bedrock edition." }
];

// Convert the data to JSONL format
const jsonlData = data.map(entry => JSON.stringify(entry)).join('\n');

// Save the data to a JSONL file
fs.writeFileSync('dataset.jsonl', jsonlData, 'utf8');

// Set up the OpenAI API configuration
const apiKey = 'MY-API-KEY';
const apiUrl = 'https://api.openai.com/v1/engines/text-davinci-003/completions';

// Read the dataset from the JSONL file
function readDataset(filePath) {
const jsonlData = fs.readFileSync(filePath, 'utf8');
const dataset = jsonlData.split('\n').filter(line => line !== '').map(line => JSON.parse(line));
return dataset;
}

// Load the dataset
const dataset = readDataset('dataset.jsonl');

// Define the API request payload
const payload = {
prompt: 'Hi',
examples: dataset,
max_tokens: 100,
n: 1,
temperature: 0.8
};

// Set up the Axios request
const axiosConfig = {
headers: {
'Authorization': Bearer ${apiKey},
'Content-Type': 'application/json'
}
};

// Make the API request
axios.post(apiUrl, payload, axiosConfig)
.then(response => {
// Print the generated completion
console.log(response.data.choices[0].text);
})
.catch(error => {
console.error('Error:', error.response.data.error);
});

#

how do I fix it?

stable yew
hollow obsidian
stable yew
#

It looks like you're trying to...train the model with this nonexistent field to response in expected ways? The closest thing to that is fine-tuning which is totally unrelated to this call, but even that doesn't accomplish what you're trying to do since fine-tuning doesn't really teach the model new things.