Pass API key via Python?
wgryc opened this issue · 2 comments
wgryc commented
I'm trying to add support for Replicate + Llama 2 into phasellm (https://github.com/wgryc/phasellm).
Our users generally add API keys programmatically via Python rather than environment variables. Does the Replicate Client
class or run()
code allow for passing an API key?
If not, I'm happy to add the code and submit a pull request. Just let me know!
mattt commented
Hi @wgryc. Yes, you can pass API keys to the Client
initializer.
from replicate import Client
client = Client(api_key="...")
wgryc commented
Oh, I missed that in the code. Thank you, works great!