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

Add JS Server Cli #17

Merged
merged 7 commits into from
Jun 5, 2023
Merged

Add JS Server Cli #17

merged 7 commits into from
Jun 5, 2023

Conversation

vowelparrot
Copy link
Contributor

@vowelparrot vowelparrot commented Jun 5, 2023

No description provided.

@@ -79,6 +82,7 @@
},
"dependencies": {
"@types/uuid": "^9.0.1",
"commander": "^10.0.1",
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 can try rolling our own if we don't want to add a dependency here but thought it not a great use of time

Copy link
Collaborator

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

@vowelparrot vowelparrot merged commit 42c043d into main Jun 5, 2023
@vowelparrot vowelparrot deleted the vwp/add_js_cli branch June 5, 2023 18:01
@vowelparrot
Copy link
Contributor Author

Oops you actually started reviewing! I can make a followup to improve

}
}

async function pprintServices(servicesStatus: any[]) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oh, probably pretty print

Copy link
Contributor Author

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"]),
Copy link
Collaborator

@jacoblee93 jacoblee93 Jun 5, 2023

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()

Copy link
Collaborator

@jacoblee93 jacoblee93 Jun 5, 2023

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>?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh yes!

vowelparrot added a commit that referenced this pull request Jun 5, 2023
vowelparrot added a commit that referenced this pull request Jun 5, 2023
vowelparrot added a commit that referenced this pull request Jun 5, 2023
];
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."
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
"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?

Copy link
Contributor Author

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!

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.

3 participants