-
Notifications
You must be signed in to change notification settings - Fork 131
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(cli): remove deno serverless & support run .ts serverless in nodejs #935
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #935 +/- ##
=========================================
Coverage ? 78.84%
=========================================
Files ? 51
Lines ? 3725
Branches ? 0
=========================================
Hits ? 2937
Misses ? 617
Partials ? 171 ☔ View full report in Codecov by Sentry. |
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.
🥰
if err != nil { | ||
return nil, errors.New("[node] command was not found. to run the sfn in ts, you need to install node. For details, visit https://nodejs.org") | ||
} | ||
npmPath, err := exec.LookPath("pnpm") |
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.
prefer pnpm
|
||
ext := filepath.Ext(entryTSFile) | ||
if ext != ".ts" { | ||
return nil, fmt.Errorf("only support typescript, got: %s", entryTSFile) |
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.
support Typescript only in current version
} | ||
|
||
// 2. install dependencies | ||
cmd := exec.Command(w.npmPath, "install") |
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.
@houjiazong when hosting, usually need npm install --production
return err | ||
} | ||
|
||
listener, err := net.ListenUnix("unix", addr) |
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.
build and OS
example-8 needs to be removed |
Description
TypeScript
to write a llm sfn, For an example, refer toexample/10-ai/llm-sfn-get-weather-ts
.yomo run app.ts
command to run the ts sfn.