Skip to content

Support for Flexible URL Configuration with Cloudflare AI Gateway #214

Answered by Chinayuesir
Chinayuesir asked this question in Q&A
Discussion options

You must be logged in to vote

I downloaded the source code and tried to solve the problem, using a hard-coded form.
In the constructor on line 33 of the file OpenAISettingsInfo.cs, the following code snippet was added:

if (ResourceName.Contains("cloudflare"))
{
    BaseRequest = "/openai/";
}
else
{
    BaseRequest = $"/{ApiVersion}/"; 
}

Fortunately, it seems to have solved my problem.
These idiosyncratic issues may occur in a very small number of developers; after all, AI Gateway is a beta feature offered by Cloudflare. Downloading the source code and reconfiguring the environment took a bit more time, but it seems to have solved my immediate problem. I may try to modify the other code and apply it to my personal o…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@Chinayuesir
Comment options

Comment options

You must be logged in to vote
1 reply
@StephenHodgson
Comment options

Answer selected by Chinayuesir
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants
Converted from issue

This discussion was converted from issue #213 on March 30, 2024 16:10.