Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

dalarsen
Copy link

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!

@CLAassistant
Copy link

CLAassistant commented May 15, 2023

CLA assistant check
All committers have signed the CLA.

@arm4b
Copy link
Member

arm4b commented Aug 11, 2023

Great stuff!
Noticed there's a StackStorm logo as icon.png. Worth replacing it with the official OpenAI logo.

@dalarsen
Copy link
Author

Great stuff! Noticed there's a StackStorm logo as icon.png. Worth replacing it with the official OpenAI logo.

Nice catch, thanks; i've replaced the logo.

Copy link
Member

@arm4b arm4b left a 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.

@@ -0,0 +1 @@
openai
Copy link
Member

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

@dalarsen
Copy link
Author

Thanks for the feedback! I think I've addressed everything, if I've missed anything please let me know. Thank you!

openai/.github/CODEOWNERS Outdated Show resolved Hide resolved
@arm4b
Copy link
Member

arm4b commented Aug 15, 2023

Thanks!
Will ask if @StackStorm-Exchange/tsc has any feedback, but the PR looks great to me!

I'll need to check why CI is failing on this as well before merging.

openai/requirements.txt Outdated Show resolved Hide resolved
@@ -0,0 +1 @@
openai>=0.27.0,<1.0
Copy link
Member

@arm4b arm4b Aug 17, 2023

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

Copy link
Author

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?

Copy link
Member

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.

Copy link
Author

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.

Copy link
Member

@arm4b arm4b left a 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?

@arm4b
Copy link
Member

arm4b commented Sep 5, 2023

!bootstrap pack

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🚀 Hold onto your hats! Now bootstrapping a new pack repo...

Bootstrapping will:
(1) extract details about the new pack;
(2) create the pack repo and repo metadata;
(3) copy this PR into the transfer branch in the new repo;
(4) use transfer branch for the pack's first PR.

Details: https://github.com/StackStorm-Exchange/exchange-incubator/actions/runs/6084026976

@arm4b
Copy link
Member

arm4b commented Sep 5, 2023

!bootstrap pack

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🚀 Hold onto your hats! Now bootstrapping a new pack repo...

Bootstrapping will:
(1) extract details about the new pack;
(2) create the pack repo and repo metadata;
(3) copy this PR into the transfer branch in the new repo;
(4) use transfer branch for the pack's first PR.

Details: https://github.com/StackStorm-Exchange/exchange-incubator/actions/runs/6084873982

@arm4b
Copy link
Member

arm4b commented Sep 5, 2023

!bootstrap pack

@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🚀 Hold onto your hats! Now bootstrapping a new pack repo...

Bootstrapping will:
(1) extract details about the new pack;
(2) create the pack repo and repo metadata;
(3) copy this PR into the transfer branch in the new repo;
(4) use transfer branch for the pack's first PR.

Details: https://github.com/StackStorm-Exchange/exchange-incubator/actions/runs/6084916981

stackstorm-neptr added a commit to StackStorm-Exchange/stackstorm-openai that referenced this pull request Sep 5, 2023
@github-actions
Copy link

github-actions bot commented Sep 5, 2023

🎉 Hoooray! Here is the pack's first PR: StackStorm-Exchange/stackstorm-openai#1

Please do the following:
(1) make sure everything looks correct in the PR;
(2) merge it!
(3) make sure a TSC Senior Maintainer has setup group and user access;
(4) wait for the next exchange index update (monitor updates here)
(5) once the index has updated, check out:
https://exchange.stackstorm.com/#openai
(6) Close WITHOUT merging this PR. DO NOT MERGE THIS PR.

@arm4b
Copy link
Member

arm4b commented Sep 5, 2023

@dalarsen We're getting closer!
The new pack repo was bootstrapped.
Need a bit more help from you in the StackStorm-Exchange/stackstorm-openai#1

@arm4b
Copy link
Member

arm4b commented Sep 15, 2023

The pack is live!
https://exchange.stackstorm.org/#openai

@dalarsen Thanks for the contribution!
Please also accept Github invite so you'll have write access to the https://github.com/StackStorm-Exchange/stackstorm-openai repository.

@arm4b arm4b closed this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants