alexchenzl 4d51967383 bump version to v0.1.3 há 4 meses atrás
..
examples e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás
lib e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás
.eslintignore e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás
README.md e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás
build.mjs e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás
index.ts e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás
package.json 4d51967383 bump version to v0.1.3 há 4 meses atrás
tsconfig.json e4072339f5 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema há 5 meses atrás

README.md

Tool Utils

This package contains JSON schema definitions and related helpers for tools used across the extension.

Contents

  • JSON schema definitions for navigator output
  • Utility functions for schema flattening, conversion and formatting

Examples

The examples/ directory contains runnable examples that demonstrate the package's functionality:

  1. flatten.ts - Demonstrates how to flatten a JSON schema by dereferencing all $ref fields
  2. convert.ts - Shows how to convert an OpenAI-compatible schema to Gemini format

To run these examples:

# Run the schema flattening example
pnpm --filter @extension/schema-utils example:flatten

# Run the schema conversion example
pnpm --filter @extension/schema-utils example:convert