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

Fail gracefully if Deno.env is not accessible #1412

Closed
stevekrouse opened this issue May 25, 2023 · 1 comment · Fixed by #1413
Closed

Fail gracefully if Deno.env is not accessible #1412

stevekrouse opened this issue May 25, 2023 · 1 comment · Fixed by #1413
Assignees

Comments

@stevekrouse
Copy link

At Val Town we block access to Deno.env, which means that LangChain will fail to run. It would be nice if it could wrap calls to Deno.env.get in a try/catch and treat a thrown exception there as you would if the environment variable simply wasn't set.

image

Alternatively, we could directly folks to using langchain via npm which sometimes succeeds and sometimes fails.

Success:

image

Fail:

image

We haven't yet figured out the cause of this intermittent error - let us know if you have any clue to it.

Here's my langChain example val: https://www.val.town/v/stevekrouse.langchainEx. You can view past versions to see what I mean.

@jacoblee93 jacoblee93 self-assigned this May 25, 2023
@jacoblee93
Copy link
Collaborator

This might be related to the second thing:

#1386

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 a pull request may close this issue.

2 participants