agent-zero icon indicating copy to clipboard operation
agent-zero copied to clipboard

Add Perplexity API

Open LordMarduk777 opened this issue 1 year ago • 10 comments

I have the Perplexity API but i dont know how to add it to the initialize file en agent zero, can someone knows how?

LordMarduk777 avatar Sep 20 '24 17:09 LordMarduk777

You must pop your Perplexity API key into the example.env file provided. You'll then need to rename this file to ".env": just the extension, no filename needed for everything to run smoothly. Inside you'll find a line that says API_KEY_PERPLEXITY= where you can insert your key.

3clyp50 avatar Sep 20 '24 19:09 3clyp50

I did it just that way, but not works, when i try to prompt its not doing anything, i think you must modify the intialize file with perplexity line

LordMarduk777 avatar Sep 20 '24 19:09 LordMarduk777

Let's do some troubleshooting because I assure you it works flawlessly for me without adding any code, just the API key. When you prompt the search, does it actually perform an online search? I mean, does A0's knowledge_tool kick off with the query for online retrieval?

You could add some code to specifically instruct Perplexity to search for reviews only, or only scientific papers, but for standard usage simply inserting the API key just works. Let me know please.

3clyp50 avatar Sep 20 '24 20:09 3clyp50

I don't add any API key because i don't have it, when i prompt something, nothing happen, it only works with minimum 1 API? In Linux, if i rename the file to .env , it will be a hidden file. Whic is the best solution?

@conocimiento-transformador Late reply, btw you can use VS Code or a code editor to edit the .env file without it disappearing.

3clyp50 avatar Sep 24 '24 00:09 3clyp50

Let's do some troubleshooting because I assure you it works flawlessly for me without adding any code, just the API key. When you prompt the search, does it actually perform an online search? I mean, does A0's knowledge_tool kick off with the query for online retrieval?

You could add some code to specifically instruct Perplexity to search for reviews only, or only scientific papers, but for standard usage simply inserting the API key just works. Let me know please.

when i prompt its not doing anything, nothing happens, is there any conflict if i have Python 3 installed?

LordMarduk777 avatar Sep 24 '24 20:09 LordMarduk777

Let's do some troubleshooting because I assure you it works flawlessly for me without adding any code, just the API key. When you prompt the search, does it actually perform an online search? I mean, does A0's knowledge_tool kick off with the query for online retrieval? You could add some code to specifically instruct Perplexity to search for reviews only, or only scientific papers, but for standard usage simply inserting the API key just works. Let me know please.

when i prompt its not doing anything, nothing happens, is there any conflict if i have Python 3 installed?

It shouldn't be a problem as Agent Zero must be run inside the conda environment with its own instance of Python 3.11.9.

3clyp50 avatar Sep 24 '24 21:09 3clyp50

Similar issue on my side. I added the perplexity ai api token to the .env file. Whatever I prompt, perplexity is not used.

o3liger avatar Sep 30 '24 10:09 o3liger

Same. Running python in conda.

solofriday avatar Oct 04 '24 17:10 solofriday

I figured the issue out, at least for me. I had to close my Cursor IDE entirely and restart everything after I added the api key in the .env file for perplexity. Now it works!

solofriday avatar Oct 04 '24 18:10 solofriday