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

feat: Add create-gensx package #66

Merged
merged 8 commits into from
Jan 7, 2025
Merged

feat: Add create-gensx package #66

merged 8 commits into from
Jan 7, 2025

Conversation

jmoseley
Copy link
Contributor

@jmoseley jmoseley commented Jan 6, 2025

Proposed changes

Add a package to make it easy to boostrap a gensx project, using npx create-gensx or npm create gensx.

Copy link

github-actions bot commented Jan 6, 2025

Coverage Report for packages/gensx

Status Category Percentage Covered / Total
🔵 Lines 56.98% 53 / 93
🔵 Statements 56.38% 53 / 94
🔵 Functions 50% 14 / 28
🔵 Branches 58.69% 27 / 46
File CoverageNo changed files found.
Generated in workflow #101 for commit 24c09e1 by the Vitest Coverage Report Action

Copy link

cloudflare-workers-and-pages bot commented Jan 6, 2025

Deploying gensx with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7c2090e
Status: ✅  Deploy successful!
Preview URL: https://9e862d7d.gensx.pages.dev
Branch Preview URL: https://jeremy-create-gensx.gensx.pages.dev

View logs

@jmoseley jmoseley force-pushed the jeremy/create_gensx branch 3 times, most recently from 0929a8b to ad9c8a8 Compare January 7, 2025 04:17
Copy link
Member

@EvanBoyle EvanBoyle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One question on whether or not we should make the example template a little more complete (add some LLM stuff).

);

const App = gsx.Component<Record<string, never>, string>(async () => {
return await gsx.execute(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default template include the open AI package (and instantiate a provider + a hello world completion?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea. That should be straightforward to add.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could also make it a different template, but that might be overkill

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that I've implemented it, my one concern is that it does not Just Work now. If you npm dev the newly created project, you can an error about a missing API key.

Is it worth that tradeoff to demonstrate the OpenAI functionality vs something that works out of the box?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a hint to the run command, so hopefully that makes this less of a problem.

Successfully created GenSX project in /var/folders/_z/v4ndzzd150x02zpv4_q_dcn40000gn/T/gensx-test-9qyIYk1jJuFY/test-project

To get started:
cd /var/folders/_z/v4ndzzd150x02zpv4_q_dcn40000gn/T/gensx-test-9qyIYk1jJuFY/test-project
OPENAI_API_KEY=<your_api_key> npm run dev

Edit src/index.tsx to start building your GenSX application.

@jmoseley jmoseley force-pushed the jeremy/create_gensx branch 2 times, most recently from 7d24149 to d37ba38 Compare January 7, 2025 20:16
@jmoseley jmoseley force-pushed the jeremy/create_gensx branch from d37ba38 to 7c2090e Compare January 7, 2025 20:18
@jmoseley jmoseley merged commit 9bb7418 into main Jan 7, 2025
7 checks passed
@jmoseley jmoseley deleted the jeremy/create_gensx branch January 7, 2025 20:19
jmoseley added a commit that referenced this pull request Jan 7, 2025
🤖 I have created a release *beep* *boop*
---


## 0.1.0 (2025-01-07)


### ✨ New Features

* Add create-gensx package
([#66](#66))
([9bb7418](9bb7418))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants