Open anakin87 opened 1 week ago
@anakin87 I would like to take up this issue. A pipeline similar to this: https://github.com/LLM-Projects/haystack-book/blob/main/chapter-4/haystack_monitoring_prompt_injection.ipynb.
@srini047 it is unrelated, sorry.
I simply mean showing an example like this:
works, but not serializable
generator = OpenAIGenerator(api_key=Secret.from_token("<your-api-key>"))
serializable, preferred way
# export an env var called OPENAI_API_KEY containing the API key
generator = OpenAIGenerator() #using the default env var for the component
serializable, with a custom env var
# export an env var called YOUR_ENV_VAR containing the API key
generator = OpenAIGenerator(api_key=Secret.from_env("YOUR_ENV_VAR"))
I actually thought an example as a pipeline. I can implement this and looks much simpler.
@anakin87 Suggested the changes through dash.readme.com
.
Looking forward to take it from there.
@dfokina please have a look when you can.
Thank you @srini047 ! I just tweaked the text a little bit, and just published the suggestions.
I have noticed on some online examples that some users struggle to understand how our Secret Management works. #1 #2
I think that our docs should begin with one of two simple practical usage examples (useful for ordinary users), before going deep into explaining the implementation.