griptape-ai / griptape

Modular Python framework for AI agents and workflows with chain-of-thought reasoning, tools, and memory.
https://www.griptape.ai
Apache License 2.0
1.99k stars 163 forks source link

unexpected keyword argument 'openai_api_key' #25

Closed andywenk closed 1 year ago

andywenk commented 1 year ago

Hi there,

thanks for creating this. I played around with the examples from https://griptape.readthedocs.io/en/latest/griptape-framework and stumbled over this error in all examples, where OpenAiPromptDriver is used

TypeError: WebScraper.__init__() got an unexpected keyword argument 'openai_api_key'

I tried also api_key because it is mentioned here https://griptape.readthedocs.io/en/latest/griptape-framework/prompt-drivers/openai/ but had no luck.

OPENAI_API_KEY is set.

Thanks for your help.

Best

Andy

andywenk commented 1 year ago

looking into the code at https://github.com/griptape-ai/griptape/blob/main/griptape/drivers/prompt/openai_prompt_driver.py#L28 I think it should read api_key ... ?

vasinov commented 1 year ago

@andywenk, thanks for reporting this issue! WebScraper doesn't require openai_api_key anymore but the docs weren't up to date. Should be all good now.