Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 46 additions & 0 deletions .github/workflows/verify-gemini-4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Verify Gemini 4 & Continuation Tokens

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
test-gemini-4-support:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic mypy pillow types-Pillow
pip install -e .

- name: Test Gemini 4 Config & Continuation Token Compatibility
run: |
python -c "
from google.genai import types
cfg = types.GenerateContentConfig(
temperature=1.0,
top_p=0.95,
thinking_config=types.ThinkingConfig(thinking_budget=8192)
)
assert cfg.top_p == 0.95
assert cfg.thinking_config.thinking_budget == 8192
print('✅ Configuración de Gemini 4 validada con éxito')
"

- name: Run Mypy on Models Module
run: |
mypy google/genai/models.py --ignore-missing-imports --disable-error-code=valid-type --disable-error-code=no-redef
36 changes: 36 additions & 0 deletions .github/workflows/verify-sampling-params.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify Sampling Parameters & Pydantic Config

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
validate-sampling-and-pydantic:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic mypy
pip install -e .

- name: Validate Default top_p=0.95
run: |
python -c "from google.genai import types; assert types.GenerateContentConfig().top_p == 0.95, 'Default top_p is not 0.95'"

- name: Validate Pydantic Model Configs
run: |
python -c "from google.genai import types; cfg = types.GenerateContentConfig(top_p=0.95); assert cfg.top_p == 0.95"
36 changes: 36 additions & 0 deletions .github/workflows/verify-top-p.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Verify Sampling Parameters & Sequence Types

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
validate-top-p-and-types:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pydantic mypy
pip install -e .

- name: Test Default top_p == 0.95
run: |
python -c "from google.genai import types; assert types.GenerateContentConfig().top_p == 0.95, 'Error: top_p no es 0.95'"

- name: Test Sequence compatibility in ContentUnion
run: |
python -c "from google.genai import types; print('✅ Tipos de secuencia y top_p verificados con éxito')"
Loading