forked from open-webui/open-webui
refac: audio
This commit is contained in:
parent
2a10438b4d
commit
710850e442
7 changed files with 133 additions and 9 deletions
|
@ -324,11 +324,11 @@ def get_embedding_model_path(
|
|||
|
||||
|
||||
def generate_openai_embeddings(
|
||||
model: str, text: str, key: str, url: str = "https://api.openai.com"
|
||||
model: str, text: str, key: str, url: str = "https://api.openai.com/v1"
|
||||
):
|
||||
try:
|
||||
r = requests.post(
|
||||
f"{url}/v1/embeddings",
|
||||
f"{url}/embeddings",
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": f"Bearer {key}",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue