Skip to content

Commit

Permalink
try fix not url error
Browse files Browse the repository at this point in the history
  • Loading branch information
pkusunjy committed Jul 14, 2024
1 parent 8adc3ec commit f2cbdc1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions liboai/components/files.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ liboai::FutureResponse liboai::Files::retrieve_async(const std::string& file_id)
bool liboai::Files::download(const std::string& file_id, const std::string& save_to) const & noexcept(false) {
return Network::Download(
save_to,
("https://1255586470-6p2g25xktr-usw.scf.tencentcs.com/files/" + file_id + "/content"),
("https://1255586470-6p2g25xktr-usw.scf.tencentcs.com/v1/files/" + file_id + "/content"),
this->auth_.GetAuthorizationHeaders()
);
}
Expand All @@ -148,7 +148,7 @@ std::future<bool> liboai::Files::download_async(const std::string& file_id, cons
return std::async(
std::launch::async, &liboai::Network::Download,
save_to,
("https://1255586470-6p2g25xktr-usw.scf.tencentcs.com/files/" + file_id + "/content"),
("https://1255586470-6p2g25xktr-usw.scf.tencentcs.com/v1/files/" + file_id + "/content"),
this->auth_.GetAuthorizationHeaders()
);
}
2 changes: 1 addition & 1 deletion liboai/include/core/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ namespace liboai {
return false;
}

const std::string openai_root_ = "https://1255586470-6p2g25xktr-usw.scf.tencentcs.com";
const std::string openai_root_ = "https://1255586470-6p2g25xktr-usw.scf.tencentcs.com/v1";
const std::string azure_root_ = ".openai.azure.com/openai";

private:
Expand Down

0 comments on commit f2cbdc1

Please sign in to comment.