This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use client"; | |
import { motion } from "motion/react"; | |
import { useState, useRef, useEffect } from "react"; | |
import { cn } from "@/lib/utils"; | |
const tabs = [ | |
{ | |
id: 0, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ArrowTopRightOnSquareIcon } from "@heroicons/react/24/outline"; | |
import Image from "next/image"; | |
// .. component code here | |
// search_results is the last message if you are using streaming, otherwise its included in the API response | |
{search_results | |
?.slice(0, 2) | |
.map((result: any) => | |
result.image_paths | |
? Object.values(result.image_paths)?.map( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import io | |
url = "https://app.baseplate.ai/api/datasets/$DATASET_ID/upload" | |
response = requests.get("https://jsonplaceholder.typicode.com/todos/1") | |
response.raise_for_status() | |
payload={'chunk_size': '700', | |
'chunk_overlap': '100', | |
'document_id': 'test_document'} | |
file_like_object = io.BytesIO(response.content) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "https://app.baseplate.ai/api/datasets/$DATASET_ID/upload" | |
payload={'chunk_size': '700', | |
'chunk_overlap': '100', | |
'document_id': '$DOC_ID'} | |
files=[ | |
('file',('file.txt',open('file.txt','rb'),'application/text')) | |
] |