-
Hi, I'm new to the topic of AI agents and I'm trying to build a quite simple app that extracts text from images. My setup is:
This is how I initialize Instructor instance: from google import genai
import instructor
def get_genai_client() -> instructor.Instructor:
client = instructor.from_genai(
genai.Client(),
use_async=False
)
return client I've been playing arround trying to glue things together and stuck with an error from GenAI API:
Instructor error
As far as I understand Gemini models do not support image related harm categories (Is it really so? Did they were merged with default ones?). instructor/instructor/utils.py Lines 800 to 812 in a54cccd Looks like Instructor tries to initialize all the available Did someone face the same issue? Were you able to resolve that somehow? Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi, I face the same issue! In fact, the same code worked on Friday but not today. I imagine Google changed something in their APIs over the weekend, or finally removed something that was already flagged as deprecated. For example, Instructor has google-generativeai as optional LLM provider, which is deprecated by Google in favor of google-genai. |
Beta Was this translation helpful? Give feedback.
Filed this also as issue here: #1658