MervinPraison / PraisonAI

PraisonAI application combines AutoGen and CrewAI or similar frameworks into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration. Chat with your ENTIRE Codebase.
https://docs.praison.ai
MIT License
2.29k stars 314 forks source link

The App checking Open AI Key instead of Gemini #160

Open krizslash opened 1 month ago

krizslash commented 1 month ago

I plan to use gemini instead of open AI but somehow when I run the app, it checking open AI keys. I already export (or SET in windows) the 'GOOGLE_API_KEY' key btw. In the setting I also had autogen framework and gemini model. I'am using Windows 10:

framework: crewai topic: create movie script about cat in mars roles: researcher: backstory: Skilled in finding and organizing information, with a focus on research efficiency. goal: Gather information about Mars and cats role: Researcher llm:
model: "google/gemini-1.5-flash-001" tasks: gather_research: description: Research and gather information about Mars, its environment, and cats, including their behavior and characteristics. expected_output: Document with research findings, including interesting facts and information. tools:

  • ''

This is the error that I got:

File "C:\Users\p\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\crewai_tools\tools\rag\rag_tool.py", line 47, in _set_default_adapter app = App.from_config(config=self.config) if self.config else App() ^^^^^ File "C:\Users\p\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\embedchain\app.py", line 114, in init self.embedding_model = embedding_model or OpenAIEmbedder() ^^^^^^^^^^^^^^^^ File "C:\Users\p\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\site-packages\embedchain\embedder\openai.py", line 19, in init api_key = self.config.api_key or os.environ["OPENAI_API_KEY"]


  File "<frozen os>", line 714, in __getitem__
KeyError: 'OPENAI_API_KEY'

Is there a way to config the setting so that it ignore open AI key?

Thanks in advance.

MervinPraison commented 1 month ago

Please try this if you are using AI Agents https://docs.praison.ai/models/google/ If you are using Chat or Code , then try using this https://litellm.vercel.app/docs/providers/gemini