Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency openai to v4.55.4 #169

Merged
merged 1 commit into from
Aug 14, 2024

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Aug 14, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
openai 4.54.0 -> 4.55.4 age adoption passing confidence

Release Notes

openai/openai-node (openai)

v4.55.4

Compare Source

Full Changelog: v4.55.3...v4.55.4

Bug Fixes
Chores

v4.55.3

Compare Source

Full Changelog: v4.55.2...v4.55.3

Chores

v4.55.2

Compare Source

Full Changelog: v4.55.1...v4.55.2

Bug Fixes
  • helpers/zod: add extract-to-root ref strategy (ef3c73c)
  • helpers/zod: add nullableStrategy option (ad89892)
  • helpers/zod: correct logic for adding root schema to definitions (e4a247a)
Chores
  • internal: add README for vendored zod-to-json-schema (d8a80a9)
  • tests: add more API request tests (04c1590)

v4.55.1

Compare Source

Full Changelog: v4.55.0...v4.55.1

Bug Fixes
  • helpers/zod: correct schema generation for recursive schemas (cb54d93)
Chores
  • api: remove old AssistantResponseFormat type (#​967) (9fd94bf)
  • internal: update test snapshots (bceea60)
  • vendor/zodJsonSchema: add option to duplicate top-level ref (84b8a38)
Documentation
  • examples: add UI generation example script (c75c017)

v4.55.0

Compare Source

Full Changelog: v4.54.0...v4.55.0

Features
  • api: add structured outputs support (573787c)

Configuration

📅 Schedule: Branch creation - "* 0-4 * * 3" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

Copy link

bedrock debug - [puLL-Merge] - openai/openai-node@v4.54.0..v4.55.4

Description

This PR introduces significant changes to enhance the OpenAI Node.js library, particularly in handling structured outputs and improving type safety. The main features include:

  1. Implementation of structured outputs support using Zod schemas
  2. Addition of new parsing capabilities for chat completions
  3. Improvements to streaming functionality
  4. Enhanced type safety and error handling

Possible Issues

  • The changes introduce more complexity to the library, which might increase the learning curve for new users.
  • Some breaking changes may affect existing implementations, requiring updates to client code.

Security Hotspots

  1. The partialParse function in src/_vendor/partial-json-parser/parser.ts parses potentially untrusted JSON. Ensure proper input validation and error handling are in place to prevent potential security vulnerabilities.

  2. The zodToJsonSchema function in src/_vendor/zod-to-json-schema/zodToJsonSchema.ts converts Zod schemas to JSON schemas. Verify that this conversion process doesn't introduce any security risks, especially when handling complex or nested schemas.

Changes

Changes

  1. src/helpers/zod.ts

    • Added new helper functions for Zod schema integration
    • Implemented zodResponseFormat and zodFunction for structured outputs
  2. src/lib/parser.ts

    • Introduced new parsing utilities for chat completions
    • Added type definitions for parsed completions
  3. src/lib/ChatCompletionStream.ts

    • Extended streaming functionality to support structured outputs
    • Added new event types for content and refusal deltas
  4. src/lib/AbstractChatCompletionRunner.ts

    • Updated to handle parsed completions and new tool types
  5. src/resources/beta/chat/completions.ts

    • Added new parse method for structured outputs
    • Updated existing methods to support new parsing capabilities
  6. src/resources/chat/completions.ts

    • Updated types to include new structured output fields
  7. tests/

    • Added new test files for Zod helpers and parsing functionality
    • Updated existing tests to cover new features
  8. package.json

    • Added Zod as a peer dependency
    • Updated version to 4.55.4
  9. Various other files

    • Minor updates and adjustments to support the new features

Copy link

openai debug - [puLL-Merge] - openai/openai-node@v4.54.0..v4.55.4

Description

This PR introduces several major changes, updates, and improvements across various parts of the OpenAI Node SDK. The changes include updates to the repository configuration, additions to CI workflows, modifications to release management, new functionality in the codebase, and enhancements to the structured output parsing helpers.

Changes

Changes

General Repository Updates

  • .github/CODEOWNERS: Added CODEOWNERS file to automatically assign reviewers from the @openai/sdks-team.
  • .github/workflows/ci.yml: Minor formatting fix (removed trailing newline).
  • .github/workflows/create-releases.yml: Minor formatting fix (added trailing newline).
  • .github/workflows/release-doctor.yml: Minor formatting fix (added trailing newline).
  • CHANGELOG.md: Updates to the changelog with versions 4.55.0 to 4.55.4, detailing bug fixes, chores, and features.

OpenAPI Specifications and Endpoints

  • .release-please-manifest.json: Updated version from 4.54.0 to 4.55.4.
  • .stats.yml: Updated the URL for the OpenAPI specifications.

Documentation

  • README.md: Updated import URL in Deno example.
  • helpers.md: Added comprehensive documentation for structured outputs parsing helpers, including examples and differences from .create().
  • api.md: Updated to reflect new types and method signatures.

Code Enhancements

  • jest.config.ts: Added configuration to use Prettier 2 and updated test path patterns.
  • package.json: Incremented version to 4.55.4. Updated dependencies, scripts, and added peerDependencies for zod.
  • scripts/build: Enhanced Deno build script to respect OPENAI_DISABLE_DENO_BUILD flag.
  • src/helpers/zod.ts: Added new helpers for structured output parsing through Zod schema.
  • src/index.ts: Added new imports for response format types.
  • src/lib/AbstractChatCompletionRunner.ts: Enhanced functionality for handling ParsedChatCompletion, and added support for new response formats and tool calls.
  • src/lib/ChatCompletionRunner.ts: Updated to support parameterized ParsedT.
  • src/lib/ChatCompletionStream.ts: Enhanced to emit new event types for content and refusal log probabilities.
  • src/lib/parser.ts: Contains core logic for structured outputs and tool parsing.
  • src/resources/beta/chat/completions.ts: Added new methods for parsing responses, supporting auto-parsable tools, and updated the structure for typed parsing.
  • tests: Added or updated multiple test cases to correspond with the new enhancements, structured output parsing, helper functions, and CI.

Possible Issues

  • The introduction of strict mode and detailed JSON schema handling might cause issues or break backward compatibility if existing schemas don't adhere to the stricter validation.
  • The new structured output parsing feature expects specific formats and might raise errors if responses don't conform to expected schemas.

Security Hotspots

None identified in the provided diff.

Changes

Changes

  • .github/CODEOWNERS: Enforced automatic reviewer assignment.
  • .github/workflows/ci.yml: Removed trailing newline.
  • .github/workflows/create-releases.yml: Added trailing newline.
  • .github/workflows/release-doctor.yml: Added trailing newline.
  • .release-please-manifest.json: Updated version.
  • .stats.yml: Updated OpenAPI spec URL.
  • CHANGELOG.md: Added multiple versions and change logs.
  • README.md: Updated Deno import URL.
  • api.md: Added and removed various types.
  • jest.config.ts: Included Prettier 2 in config.
  • package.json: Updated version, dependencies, and scripts.
  • scripts/build: Modified Deno build logic.
  • src/helpers/zod.ts: New file introducing structured output parsing helpers.
  • src/index.ts: Added new response format imports.
  • src/lib/AbstractChatCompletionRunner.ts: Added support for ParsedChatCompletion.
  • src/lib/ChatCompletionRunner.ts: Supports parameterized runs for structured parsing.
  • src/lib/ChatCompletionStream.ts: Enhanced to emit events for log probabilities and refusal messages.
  • src/lib/parser.ts: Core file for tool and response parsing.
  • src/resources/beta/chat/completions.ts: Methods for structured parsing and typed responses.
  • tests/: Added and updated various test files to ensure the functionality of new features.

Copy link

anthropic debug - [puLL-Merge] - openai/openai-node@v4.54.0..v4.55.4

Description

This PR introduces significant changes to the OpenAI Node.js library, including the addition of structured output parsing, new parsing helpers for Zod schemas, updates to the chat completion API, and various other improvements and bug fixes.

Changes

Changes

By filename:

  1. .github/CODEOWNERS:

    • Added explanatory comments and updated the ownership.
  2. .github/workflows/ci.yml, create-releases.yml, release-doctor.yml:

    • Minor formatting changes.
  3. .release-please-manifest.json, .stats.yml:

    • Updated version numbers and OpenAPI spec URL.
  4. CHANGELOG.md:

    • Added entries for versions 4.55.4, 4.55.3, 4.55.2, 4.55.1, and 4.55.0, detailing new features, bug fixes, and improvements.
  5. README.md:

    • Updated the Deno import version.
  6. api.md:

    • Updated API documentation to reflect new types and changes.
  7. bin/check-release-environment:

    • Minor formatting change.
  8. New files: examples/parsing-run-tools.ts, parsing-stream.ts, parsing-tools-stream.ts, parsing-tools.ts, parsing.ts, ui-generation.ts:

    • Added new example files demonstrating the use of new parsing features.
  9. examples/stream.ts, tool-call-helpers-zod.ts:

    • Updated examples to use new API methods.
  10. jest.config.ts:

    • Added prettierPath configuration.
  11. package.json:

    • Updated version to 4.55.4.
    • Added Zod as a peer dependency.
    • Updated scripts and dependencies.
  12. scripts/build, build-deno:

    • Updated build scripts and version numbers.
  13. scripts/format, lint:

    • Updated linting and formatting scripts.
  14. scripts/mock:

    • Updated mock server version.
  15. New directory: src/_vendor/:

    • Added vendored versions of partial-json-parser and zod-to-json-schema.
  16. src/error.ts:

    • Added new error classes for length and content filter finish reasons.
  17. New file: src/helpers/zod.ts:

    • Added new helpers for working with Zod schemas.
  18. src/index.ts:

    • Updated exports to include new types and namespaces.
  19. src/lib/: (Various files)

    • Significant updates to chat completion runners and streams to support new parsing features.
  20. New file: src/lib/parser.ts:

    • Added new parsing utilities.
  21. src/resources/: (Various files)

    • Updated resource definitions to include new types and parameters.
  22. src/version.ts:

    • Updated version number.
  23. Various test files:

    • Added new tests and updated existing ones to cover new functionality.

Possible Issues

  1. The addition of Zod as a peer dependency might require users to update their dependencies.
  2. Changes to the chat completion API might require updates to existing code that uses these features.

Security Hotspots

No significant security issues were identified in this change. However, as with any major update, it's important to thoroughly test the new functionality, especially the parsing features, to ensure they handle user input safely and as expected.

@thypon thypon merged commit 18685be into main Aug 14, 2024
8 checks passed
@thypon thypon deleted the renovate/openai-4.x-lockfile branch August 14, 2024 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant