const axios = require("axios").default;
const options = {
method: "POST",
url:
"https://api.edenai.run/v2/aiproducts/askyoda/e3501019-28b7-46f0-8ed5-7a5600d409a1/ask_llm",
headers: {
authorization: "Bearer 🔑your API key",
},
data: {
query: "Which product is the most expensive?",
llm_provider: "openai",
llm_model: "gpt-3.5-turbo-instruct",
k: 5,
filter_documents: {"metadata1":"value1"},
},
};
axios.
request(options).
then((response) => {
console.log(response.data);
}).
catch((error) => {
console.error(error);
});