Files
alexchenzl 0574265ca2 1. add a package to flatten OpenAI compatible json schema, and convert it to Gemini compatible schema
2. Gemini does not allow to send message with empty content
3. Ignore any input generated by LLM if the schema only has an empty object argument
4. Occasionally validator fall into a failure loop, fix it by re-planning
5. Update model settings to add Gemini models, and claude 3.7
2025-03-09 22:22:51 +08:00

762 B

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