diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ac9383606..a779f953f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,7 +37,7 @@ jobs: - name: Run tests if: matrix.python-version != '3.11' - run: poetry run pytest tests/ -k "not openai and not anthropic and not evals and not docs" + run: poetry run pytest tests/ -k "not openai and not anthropic and not evals and not docs and not gemini" env: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} diff --git a/instructor/process_response.py b/instructor/process_response.py index 7140b1fca..c035c3e31 100644 --- a/instructor/process_response.py +++ b/instructor/process_response.py @@ -10,7 +10,6 @@ from instructor.function_calls import OpenAISchema, openai_schema from instructor.utils import merge_consecutive_messages from openai.types.chat import ChatCompletion -from google.generativeai.types import HarmCategory, HarmBlockThreshold from pydantic import BaseModel import json @@ -315,7 +314,9 @@ def handle_response_model( + "\n\n".join(openai_system_messages) ) - new_kwargs["system"] += f""" + new_kwargs[ + "system" + ] += f""" You must only response in JSON format that adheres to the following schema: