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

langchain_core: add file_type option to make file type default as png #27855

Merged
merged 7 commits into from
Nov 6, 2024

Commits on Nov 2, 2024

  1. add file_type to make file type default png

    langchain_core.runnables.graph_mermaid.draw_mermaid_png calls this function, but the Mermaid API returns JPEG as default.
    Add option `file_type` with default `png` type to be consistent.
    Also background_color default was wrong and fixed with `!`
    MasaYan24 authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    821c9bc View commit details
    Browse the repository at this point in the history
  2. Revert incorrect fix from previous commit

    I mistakenly thought there was an error in the `background_color` option and added a `!` for correction. However, the `!` was already correctly added further down. This commit reverts the incorrect fix.
    MasaYan24 authored Nov 2, 2024
    Configuration menu
    Copy the full SHA
    f9a2ffe View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2024

  1. Bug fixed: the option added as last option

    The `file_type` option was added as the second option, but the other function calling the function `_render_mermaid_using_api` without option names crashes.
    The `file_type` option was added as the last option, so the effect is controlled locally.
    MasaYan24 authored Nov 3, 2024
    Configuration menu
    Copy the full SHA
    f66abc2 View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2024

  1. Configuration menu
    Copy the full SHA
    264222d View commit details
    Browse the repository at this point in the history

Commits on Nov 6, 2024

  1. update type annotation

    I have updated the type annotations to be more stringent. `Optional[str]` to `Optional[Literal["jpeg", "png", "webp"]]`.
    MasaYan24 authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    9fa2109 View commit details
    Browse the repository at this point in the history
  2. bug fixed: Literal is imported from typing lib.

    `Literal` has not been imported. Fixed.
    MasaYan24 authored Nov 6, 2024
    Configuration menu
    Copy the full SHA
    49bc0e0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ddd7715 View commit details
    Browse the repository at this point in the history