Tutorials
[Javascript] Pass multiple files and urls!
API Documentation
Endpoints
Tutorials
- Create an Instance with multiple Data Sources
- Dynamically Creating Custom GPT-4 Instances for Substack Blog Posts with BerriAI
- Embed your Berri App into your Website
- Classification + Multi-prompting Tutorial
- Improving Document QA w/ Custom Chunking Tutorial
- Build a slackbot to call your Berri / chatGPT endpoints
- [Javascript] Pass a query with conversation history!
- [Javascript] Pass multiple files and urls!
- Improving Results - 3 strategies w/ Berri
Additional Resources
Support & FAQs
Tutorials
[Javascript] Pass multiple files and urls!
This tutorial will guide you on how to create a BerriAI instance over multiple files and urls, in javascript.
const fetch = require("node-fetch");
const tmp_list = [
"hello who are you",
"https://www.hosteeva.com/about-us",
"https://www.hosteeva.com/privacy",
];
const url = "https://api.berri.ai/create_app";
const formData = new URLSearchParams();
formData.append("user_email", "ishaan@berri.ai"); // Replace with your form field and value
formData.append("data_source", JSON.stringify(tmp_list));
fetch(url, {
method: "POST",
body: formData,
})
.then((response) => response.text())
.then((data) => console.log(data))
.catch((error) => {
console.log("reaches error");
console.error(error);
});