AnswerDotAI / fastdata

Apache License 2.0
121 stars 7 forks source link

api_key isn't supported #4

Closed nattaylor closed 1 week ago

nattaylor commented 2 weeks ago

README.md says you can pass an api_key argument, but it is not implemented.

This is easily worked around with the environment variable.

ncoop57 commented 1 week ago

Thanks for the issue @nattaylor ! Is there a specific usecase you image where the person would require passing it as a variable rather than having it as an environment variable that we automatically read? I'm down to add support for it though we will need to do it in 2 places, one here, and one in our claudette library.

nattaylor commented 1 week ago

The docs say the api_key arg is supported and it's the first thing I tried ...that's my only use case. It was trivially resolved by setting the env variable, so I agree that my PR is dumb.

We only support Anthropic models at the moment. Therefore, make sure you have an API key for the model you want to use and the proper environment variables set or pass the api key to the FastData class FastData(api_key="sk-ant-api03-...").