danielmiessler / fabric

fabric is an open-source framework for augmenting humans using AI. It provides a modular framework for solving specific problems using a crowdsourced set of AI prompts that can be used anywhere.
https://danielmiessler.com/p/fabric-origin-story
MIT License
23.48k stars 2.49k forks source link

exporting Google models as DEFAULT_MODEL doesn't work; neither does specifying one with --model #674

Closed AndreLeifert closed 1 month ago

AndreLeifert commented 3 months ago

What happened?

cat /tmp/transcript.txt | fabric --pattern summarize --model gemini-1.5-flash results in an error while cat /tmp/transcript.txt | fabric --pattern summarize --model models/gemini-1.5-flash works

The "error" is in fetch_available_models inside utils.py - genai.list_models() precedes model names by models/. I am opening a fixing PR.

Version check

Relevant log output

Error: Error code: 404 - {'error': {'message': 'The model `gemini-1.5-flash` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}
Error code: 404 - {'error': {'message': 'The model `gemini-1.5-flash` does not exist or you do not have access to it.', 'type': 'invalid_request_error', 'param': None, 'code': 'model_not_found'}}

Relevant screenshots (optional)

No response

jotamjr commented 3 months ago

I can confirm the same.

Regards,