-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pack to integrate OpenAI API to Stackstorm #179
Conversation
Great stuff! |
Nice catch, thanks; i've replaced the logo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome addition to the StackStorm Exchange. Thanks for the contribution!
Looking at other packs, please also include the following to make it complete:
CHANGES.md
(example)openai.yaml.example
(like this) - just an example of pack config with some dummy data.github/CODEOWNERS
(example) and include yourself as a maintainer + @StackStorm-Exchange/tsc, - this way on every PR and issue we'll get notifications- Add yourself as a Maintainer in the README footer (example format)
Some basic /tests/ would be nice if you can add them too, but not required.
I think some ChatOps action aliases would be ideal for such a pack, but we can add them in a later PRs after creating a pack.
openai/requirements.txt
Outdated
@@ -0,0 +1 @@ | |||
openai |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally to pin the version to the current major (interval) in case of the upstream breaking changes
Thanks for the feedback! I think I've addressed everything, if I've missed anything please let me know. Thank you! |
Thanks! I'll need to check why CI is failing on this as well before merging. |
Co-authored-by: Eugen C. <[email protected]>
@@ -0,0 +1 @@ | |||
openai>=0.27.0,<1.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see now what's going on.
https://pypi.org/project/openai/ Requires minimum Python >=3.7.1
, while the tests are ran under the python 3.6
The technical debt of maintaining the Python versions follows us everywhere: StackStorm/community#103
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, that explains it! As a workaround would it be an option for me to just modify the github action that does the tests to use a later Python version (and/or change the image being used to one that's noted to support a later Python version)? Or is there more to it than that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I think it worth trying with Python 3.8 👍 as that's the other version supported by StackStorm.
After pack is promoted to Exchange, we use a common GHA for the builds: https://github.com/StackStorm-Exchange/stackstorm-jira/blob/master/.github/workflows/build_and_test.yaml which is ran under the py3.6
But I just discovered some packs (https://github.com/StackStorm-Exchange/stackstorm-vault/blob/master/.github/workflows/build_and_test.yaml) have this workflow overridden, so it should be fine to do that as well in this new pack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the workflow to use 3.8 and it looks like it's passing now, though I'm not sure if I did it in a way that it would be kept if it were to be moved to the Exchange.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! Thanks @dalarsen!
@cognifloyd I'm going to bootstrap the pack next, following the #172 you've built and see what happens 🤞 Do you foresee any potential issues by switching the CI workflow to py3.8 in this PR?
!bootstrap pack |
🚀 Hold onto your hats! Now bootstrapping a new pack repo... Bootstrapping will: Details: https://github.com/StackStorm-Exchange/exchange-incubator/actions/runs/6084026976 |
!bootstrap pack |
🚀 Hold onto your hats! Now bootstrapping a new pack repo... Bootstrapping will: Details: https://github.com/StackStorm-Exchange/exchange-incubator/actions/runs/6084873982 |
!bootstrap pack |
🚀 Hold onto your hats! Now bootstrapping a new pack repo... Bootstrapping will: Details: https://github.com/StackStorm-Exchange/exchange-incubator/actions/runs/6084916981 |
🎉 Hoooray! Here is the pack's first PR: StackStorm-Exchange/stackstorm-openai#1 Please do the following: |
@dalarsen We're getting closer! |
The pack is live! @dalarsen Thanks for the contribution! |
Pack that adds two actions (chat completion and image generation) through the OpenAI API. Hopefully I've included most of the necessary stuff for this to be correct but please let me know of any changes that are needed. Thank you!