mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-09 11:31:27 +00:00
wip debugging
This commit is contained in:
1 parent
521d6de991
commit
97bd706973
2 files changed
+23
-5
No files matched your search
+1
-1
@@ -76,7 +76,7 @@ pub async fn enqueue_gpt_image_1_edit_image_webhook<V: IntoUrl>(
|
||||
image_size: image_size.to_string(),
|
||||
num_images,
|
||||
quality: quality.to_string(),
|
||||
openai_api_key: "".to_string(),
|
||||
openai_api_key: args.open_ai_api_key.0.to_string(),
|
||||
};
|
||||
|
||||
let result = gpt_edit_image(request)
|
||||
|
||||
Vendored
+22
-4
@@ -137,22 +137,40 @@ impl<Params: Serialize, Response: DeserializeOwned> FalRequest<Params, Response>
|
||||
.api_key
|
||||
.expect("No fal API key provided, and FAL_API_KEY environment variable is not set");
|
||||
|
||||
println!("Getting URL...");
|
||||
|
||||
let url_encoded = url.into_url()?;
|
||||
//let url_encoded = utf8_percent_encode(url_encoded.as_str(), NON_ALPHANUMERIC).to_string();
|
||||
|
||||
let request_url = format!("https://queue.fal.run/{}?fal_webhook={}", self.endpoint, url_encoded);
|
||||
|
||||
info!("Sending request to FAL queue webhook: {}", request_url);
|
||||
println!("Sending request to FAL queue webhook: {}", request_url);
|
||||
|
||||
let response = self
|
||||
let builder = self
|
||||
.client
|
||||
.post(request_url)
|
||||
.post(request_url);
|
||||
|
||||
println!("Builder 1");
|
||||
println!("key is {}", &key);
|
||||
|
||||
let builder = builder
|
||||
.json(&self.params)
|
||||
.header("Authorization", format!("Key {}", &key))
|
||||
.header("Content-Type", "application/json")
|
||||
.send()
|
||||
.header("Content-Type", "application/json");
|
||||
|
||||
println!("Builder 2");
|
||||
|
||||
let response = builder
|
||||
.send();
|
||||
|
||||
println!("Builder sent");
|
||||
|
||||
let response = response
|
||||
.await?;
|
||||
|
||||
println!("Response status: {:?}", response.status());
|
||||
|
||||
if response.status() != 200 {
|
||||
let error = response.text().await?;
|
||||
return Err(error.into());
|
||||
|
||||
Reference in new issue
Block a user