feat: add @toon-format/toon dependency and integrate into OpenAI notebooks

- Updated deno.lock and package.json to include @toon-format/toon@^2.1.0.
- Modified background-openai.ipynb to handle error responses and adjust execution counts.
- Enhanced definitions-openai.ipynb to include additional metadata for perishables and origen schemas.
- Refactored embeddings-openai.ipynb to improve error handling and output formatting.
- Updated create-chat-conversation function to append messages and responses to conversations.
- Added SQL functions for appending conversation data to the database.
This commit is contained in:
2026-02-24 15:20:19 -06:00
parent dcaeeb72dd
commit 7ee9944ab5
8 changed files with 234 additions and 110 deletions
+8 -4
View File
@@ -83,11 +83,13 @@
},
{
"cell_type": "code",
"execution_count": 26,
"execution_count": null,
"id": "1403c789",
"metadata": {},
"outputs": [],
"source": [
"import { title } from \"node:process\";\n",
"\n",
"const combinedSchema = {\n",
" type: \"object\",\n",
" $defs: {\n",
@@ -126,10 +128,12 @@
" fabricante: { type: \"string\", maxLength: 100 },\n",
"\n",
" // Agregar campo del preset\n",
" perishables: { $ref: \"#/$defs/perishables\" },\n",
" origen: { $ref: \"#/$defs/origen\" },\n",
" perishables: {\n",
" $ref: \"#/$defs/perishables\",\n",
" \"x-column\": \"perishables\",\n",
" },\n",
"\n",
" perecedero: { type: \"null\", \"x-column\": \"perishable\", const: null },\n",
" origen: { $ref: \"#/$defs/origen\" },\n",
" },\n",
" required: [\"nombre\", \"fabricante\", \"perishables\", \"origen\", \"perecedero\"],\n",
" additionalProperties: false,\n",