Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Perplexity API #141

Open
LordMarduk777 opened this issue Sep 20, 2024 · 10 comments
Open

Add Perplexity API #141

LordMarduk777 opened this issue Sep 20, 2024 · 10 comments

Comments

@LordMarduk777
Copy link

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

@3clyp50
Copy link
Contributor

3clyp50 commented Sep 20, 2024

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.

@LordMarduk777
Copy link
Author

LordMarduk777 commented Sep 20, 2024

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

@3clyp50
Copy link
Contributor

3clyp50 commented Sep 20, 2024

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.

@conocimiento-transformador

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?

@3clyp50
Copy link
Contributor

3clyp50 commented Sep 24, 2024

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

@LordMarduk777
Copy link
Author

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?

@3clyp50
Copy link
Contributor

3clyp50 commented Sep 24, 2024

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.

@o3liger
Copy link

o3liger commented Sep 30, 2024

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

@solofriday
Copy link

Same. Running python in conda.

@solofriday
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants