holoviz-topics / panel-chat-examples

Examples of Chat Bots using Panels chat features: Traditional, LLMs, AI Agents, LangChain, OpenAI etc
https://holoviz-topics.github.io/panel-chat-examples/
MIT License
105 stars 31 forks source link

Enable testing openai examples with monkeypatching / mocking #30

Open MarcSkovMadsen opened 10 months ago

MarcSkovMadsen commented 10 months ago

Currently I cannot test all examples in the github build pipelines because an OPENAI_API_KEY is not available.

Please provide a key in the pipeline or specify how we should test those examples. Thanks.

Example: https://github.com/holoviz-topics/panel-chat-examples/pull/12

https://github.com/holoviz-topics/panel-chat-examples/actions/runs/6440192051/job/17488753601?pr=12

image

Workaround

For now I will disable testing the specific examples such that I can get my PR in before another major change to the repo happens. This will help me avoid spending a day of refactoring of my PRs.

Additional Context

With probably some work it is possible to mock the OPENAI api. See https://github.com/openai/openai-python/issues/398#issuecomment-1742862473

MarcSkovMadsen commented 10 months ago

For now we work around the problem by not testing those examples in the pipeline.