-
Notifications
You must be signed in to change notification settings - Fork 2k
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
createOpenAPIChain
throws error if servers
field is missing
#3268
Comments
🤖 Hello again @Manouchehri, good to see you! I hope you're doing well. Thanks for detailed report. I'm diving into this issue that you've brought up about the |
🤖 Thank you for bringing this to our attention. It seems like the To fix this issue, we can modify the get baseUrl() {
if (this.document.servers) {
return this.document.servers[0].url;
} else {
const url = new URL(this.document.url);
return url.origin;
}
} In the above code, Please note that this change should be made in the I hope this helps! If you have any further questions or run into any issues, please don't hesitate to ask. Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Hi, @Manouchehri, I'm helping the langchainjs team manage their backlog and am marking this issue as stale. From what I understand, you raised an issue regarding a TypeError thrown by the Could you please confirm if this issue is still relevant to the latest version of the langchainjs repository? If it is, please let the langchainjs team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
We should fix this by defaulting to the same server as the spec if the
servers
object is missing. e.g. if the spec is onhttps://caymanweather.aimoda.dev/openapi.json
, we can safely assume that the server is also onhttps://caymanweather.aimoda.dev
.Related to #3267 and semi-related to honojs/middleware#243.
The text was updated successfully, but these errors were encountered: