Skip to content

Commit

Permalink
Support DALL-E-3 now
Browse files Browse the repository at this point in the history
VIa variable name DEPLOY_NAME_DALLE3
  • Loading branch information
haibbo committed Dec 9, 2023
1 parent 59689b4 commit 365274b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cf-openai-azure-proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const mapper = {
'gpt-3.5-turbo': DEPLOY_NAME_GPT35,
'gpt-3.5-turbo-0613': DEPLOY_NAME_GPT35,
'gpt-4': DEPLOY_NAME_GPT4,
"dall-e-3": typeof DEPLOY_NAME_DALLE3 !== 'undefined' ? DEPLOY_NAME_DALLE3 : "dalle3",
};

const apiVersion="2023-12-01-preview"
Expand All @@ -25,6 +26,8 @@ async function handleRequest(request) {
}
if (url.pathname === '/v1/chat/completions') {
var path="chat/completions"
} else if (url.pathname === '/v1/images/generations') {
var path="images/generations"
} else if (url.pathname === '/v1/completions') {
var path="completions"
} else if (url.pathname === '/v1/models') {
Expand Down

0 comments on commit 365274b

Please sign in to comment.