I have an app which would benefit from a simple KV solution
I have an app which would benefit from a simple KV solution
global rate limit 1200 requests per 5 minutes, shared with your account including dashboard, and all request have to go back to core/no edge caching



const fileContent = "This is a simple text file.";
const file = new File([fileContent], "simple_text_file.txt", {
type: "text/plain",
});
formData.set("file", file);
formData.append("purpose", "fine-tune")
const fetchOptions: RequestInit = {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
},
body: formData,
};
// Make the POST request to OpenAI
const response = await fetch("https://api.openai.com/v1/files", fetchOptions); const promise = fetch('http://localhost:3000/impression', {
method: "POST",
body: JSON.stringify(data),
headers: {
"content-type": "application/json",
}
});
c.executionCtx.waitUntil(promise.then())
flow.params = { campaignId: campaignId }
return flow; c.executionCtx.waitUntil(fetch('http://localhost:3000/impression', {
method: "POST",
body: JSON.stringify(data),
headers: {
"content-type": "application/json",
}
}).catch((e) => console.error("Error doing impressions", e))
);export default {
async fetch(request: Request): Promise<Response> {
/**
* Replace `remote` with the host you wish to send requests to
*/
const remote = "https://example.com";
return await fetch(remote, request);
},
};