Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

base url with path not work #494

Open
h928725721 opened this issue Apr 22, 2024 · 2 comments
Open

base url with path not work #494

h928725721 opened this issue Apr 22, 2024 · 2 comments

Comments

@h928725721
Copy link

hello:
my base url is https://host/chat/api
when I used openAiService to request my chat project, the url would be replaced with https://host/v1/chat/completions.
but I wish the result is https://host/chat/api/v1/chat/completions
how should I do ?

the maven version is 0.17.0

@h928725721 h928725721 changed the title base url with path not word base url with path not work Apr 22, 2024
@vacuityv
Copy link
Contributor

two ways:
1、convert url with nginx
2、change sdk: the OpenaiApi in the sdk @post("/v1/chat/completions") should change to: @post("v1/chat/completions")
delete the / at the beginning.
Since the ownner of this rep didn't maintain this for a long time, you can use the first method.
or you can use my rep :)
@h928725721

@xyifhgvnlo286
Copy link

xyifhgvnlo286 commented Apr 23, 2024

openai4j

The latest code in the repository supports your requirements, and the API endpoint no longer contains the symbol '/v1'. You can check the specific content of its code repository

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants