llama-stack-mirror/llama_stack/providers
ehhuang ffe3d0b2cd
fix: nullable param type for function call (#2086)
Nullable param type is not supported, e.g. ['string', 'null'], since it
fails type validation.

Tests:
Run inference with

        messages:
- content: You are a helpful assistant that can use tools to get
information.
          role: system
        - content: What's the temperature in San Francisco in celsius?
          role: user
        tools:
        - function:
            description: Get current temperature for a given location.
            name: get_weather
            parameters:
              additionalProperties: false
              properties:
                location:
description: "City and country e.g. Bogot\xE1, Colombia"
                  type: string
                unit:
                  description: "Unit of temperature, default to celsius"
                  type: [string, "null"]  # <= nullable type
              required:
              - location
              type: object
          type: function

Co-authored-by: Eric Huang <erichuang@fb.com>
2025-05-01 13:17:36 -07:00
..
inline feat: Add temperature support to responses API (#2065) 2025-05-01 11:47:58 -07:00
registry feat: add api.llama provider, llama-guard-4 model (#2058) 2025-04-29 10:07:41 -07:00
remote fix: allow use of models registered at runtime (#1980) 2025-05-01 12:00:58 -07:00
tests refactor: move all llama code to models/llama out of meta reference (#1887) 2025-04-07 15:03:58 -07:00
utils fix: nullable param type for function call (#2086) 2025-05-01 13:17:36 -07:00
__init__.py API Updates (#73) 2024-09-17 19:51:35 -07:00
datatypes.py fix: allow use of models registered at runtime (#1980) 2025-05-01 12:00:58 -07:00