Skip to content
This repository has been archived by the owner on Jul 9, 2024. It is now read-only.

fix the bugs when the streams features open, Url not declared #12

Merged
merged 1 commit into from
Apr 15, 2023

Conversation

einsli
Copy link

@einsli einsli commented Apr 4, 2023

This pr fixes the following problem. When the streams feature of chatgpt_rs is enabled, the following error is reported ”Url not declared“!

Copy link
Owner

@Maxuss Maxuss left a comment

Choose a reason for hiding this comment

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

Thank you for pointing out these things I missed last update! Just a few changes and it's good to go.

Comment on lines 161 to 164
.post(
Url::from_str(self.config.api_url)
Url::parse(self.config.api_url.as_str())
.map_err(|err| crate::err::Error::ParsingError(err.to_string()))?,
)
Copy link
Owner

Choose a reason for hiding this comment

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

This can be changed to:

Suggested change
.post(
Url::from_str(self.config.api_url)
Url::parse(self.config.api_url.as_str())
.map_err(|err| crate::err::Error::ParsingError(err.to_string()))?,
)
.post(self.config.api_url.clone())

Comment on lines 249 to 252
.post(
Url::from_str(self.config.api_url)
Url::parse(self.config.api_url.as_str())
.map_err(|err| crate::err::Error::ParsingError(err.to_string()))?,
)
Copy link
Owner

Choose a reason for hiding this comment

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

This as well

Copy link

@tmac33 tmac33 left a comment

Choose a reason for hiding this comment

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

Nice one!

@Maxuss Maxuss merged commit a6d7230 into Maxuss:master Apr 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants