-
Notifications
You must be signed in to change notification settings - Fork 74
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
Add JS Server Cli #17
Conversation
f8c7d33
to
128efe0
Compare
@@ -79,6 +82,7 @@ | |||
}, | |||
"dependencies": { | |||
"@types/uuid": "^9.0.1", | |||
"commander": "^10.0.1", |
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 can try rolling our own if we don't want to add a dependency here but thought it not a great use of time
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.
100M+ weekly downloads, MIT licensed, 0 deps so it is good w/ me
Oops you actually started reviewing! I can make a followup to improve |
} | ||
} | ||
|
||
async function pprintServices(servicesStatus: any[]) { |
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.
Typo?
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.
Oh, probably pretty print
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.
Ya it's my copy over from python pretty print
for (const service of servicesStatus) { | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
const serviceStatus: Record<string, any> = { | ||
Service: String(service["Service"]), |
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 there's not a specific reason to use this constructor, would say it should be service.Service?.toString()
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.
Or wait what is service.Service
?
A little confused by this below since you're not converting it there:
const maxServiceLen = Math.max(
...services.map((service) => service["Service"].length)
)
If it's always a string, can the above be Record<string, string>
?
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.
Oh yes!
]; | ||
await exec(command.join(" ")); | ||
console.info( | ||
"LangChainPlus server is running at http://localhost. To connect locally, set the following environment variable when running your LangChain application." |
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.
"LangChainPlus server is running at http://localhost. To connect locally, set the following environment variable when running your LangChain application." | |
"LangChainPlus is running at http://localhost. To connect locally, set the following environment variable when running your LangChain application." |
Technically the server is running at localhost:1984, at port 80 its the UI, which I think is what was meant here?
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.
Hm right I am inconsistent with this and ngrok too - I'll clean up the language. Thanks for calling this out!
No description provided.