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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> // For isspace | |
#include <libxml/HTMLparser.h> | |
#include <libxml/tree.h> | |
#include <hpdf.h> | |
// Global PDF settings | |
#define PAGE_WIDTH 595.28f // A4 paper width in points (210mm) |
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
<!DOCTYPE html> | |
<html lang="pt-BR"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>SimpleCanvasLLM with History - Chat Style</title> | |
<link | |
rel="stylesheet" | |
href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" | |
/> | |
<link |
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
/** | |
* @typedef {'object' | 'array'} ContainerType | |
*/ | |
/** | |
* @typedef {Object} ParserEvent | |
* @property {'objectStart' | 'objectEnd' | 'arrayStart' | 'arrayEnd' | 'key' | 'valueChunk' | 'value' | 'done' | 'error'} type | |
* @property {(string|number)[]} [path] | |
* @property {*} [value] | |
* @property {string} [chunk] |
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
/** | |
* @typedef {'object' | 'array'} ContainerType | |
*/ | |
/** | |
* @typedef {Object} ParserEvent | |
* @property {'objectStart' | 'objectEnd' | 'arrayStart' | 'arrayEnd' | 'key' | 'valueChunk' | 'value'} type | |
* @property {(string|number)[]} path | |
* @property {*} [value] | |
* @property {string} [chunk] |
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
docker build . \ | |
--target vllm-openai \ | |
--file docker/Dockerfile \ | |
--tag vllm-5090:latest \ | |
--build-arg max_jobs=2 \ | |
--build-arg nvcc_threads=1 \ | |
--build-arg RUN_WHEEL_CHECK=false \ | |
--progress=plain | tee build.log |
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
from __future__ import annotations | |
import io | |
import mmap | |
import pathlib | |
import struct | |
import time | |
from enum import IntEnum | |
from typing import Any, BinaryIO, Dict, List, Tuple |
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
<!DOCTYPE html> | |
<html lang="pt-br"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Editor Markdown Avançado</title> | |
<!-- CSS Essencial do Editor (para ser distribuído com o editor) --> | |
<style id="editor-core-styles"> |
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
<!DOCTYPE html> | |
<html lang="pt-BR"> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>SimpleCanvasLLM with History - Chat Style</title> | |
<link rel="stylesheet" href="https://uicdn.toast.com/editor/latest/toastui-editor.min.css" /> | |
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet"> | |
<style> | |
html, |
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
(async function() { | |
// 1) URL do seu servidor | |
const ENDPOINT = "http://localhost:8081/v1/chat/completions"; | |
// 2) Nome exato do modelo (case‐sensitive) | |
const MODEL = "seu-modelo-aqui"; | |
// 3) Texto que o usuário pediu | |
const PROMPT_DO_USUARIO = "escreva uma redação sobre a vida"; |
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
(async () => { | |
// 1) Ajuste para o URL do seu servidor | |
const ENDPOINT = "http://localhost:8081/v1/chat/completions"; | |
// 2) Use exatamente o mesmo nome de modelo que funcionou no Python | |
const MODEL = "seu-modelo-aqui"; | |
// 3) Prompt de teste (igual ao Python: "Who won the world series in 2020") | |
const PROMPT = "Who won the world series in 2020"; |
NewerOlder