Skip to content

Commit 0c9d3a6

Browse files
author
Abraham Lazaro Martinez
committed
refactor code
1 parent 118ce29 commit 0c9d3a6

File tree

1 file changed

+3
-3
lines changed
  • py/plugins/google-genai/src/genkit/plugins/google_genai/models

1 file changed

+3
-3
lines changed

py/plugins/google-genai/src/genkit/plugins/google_genai/models/gemini.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -547,12 +547,12 @@ def _convert_schema_property(
547547
if '$ref' in input_schema:
548548
ref_path = input_schema['$ref']
549549
ref_tokens = ref_path.split('/')
550-
ref_name = ref_tokens[2]
550+
ref_name = ref_tokens[-1]
551551

552552
if ref_name not in defs:
553-
raise ValueError(f'Failed to resolve schema for {ref_tokens[2]}')
553+
raise ValueError(f'Failed to resolve schema for {ref_name}')
554554

555-
schema = self._convert_schema_property(defs[ref_tokens[2]], defs)
555+
schema = self._convert_schema_property(defs[ref_name], defs)
556556

557557
if input_schema.get('description'):
558558
schema.description = input_schema['description']

0 commit comments

Comments
 (0)