mirror of
https://github.com/open-webui/pipelines
synced 2025-05-10 15:40:55 +00:00
Fix param names - azure_openai_pipeline.py
Fixed 2 bugs, lack of import os, and wrong valves parameters names
This commit is contained in:
parent
412ef9d2d3
commit
7a517ecf9c
@ -1,6 +1,7 @@
|
||||
from typing import List, Union, Generator, Iterator
|
||||
from pydantic import BaseModel
|
||||
import requests
|
||||
import os
|
||||
|
||||
|
||||
class Pipeline:
|
||||
@ -52,7 +53,7 @@ class Pipeline:
|
||||
"Content-Type": "application/json",
|
||||
}
|
||||
|
||||
url = f"{self.valves.AZURE_OPENAI_ENDPOINT}/openai/deployments/{self.valves.DEPLOYMENT_NAME}/chat/completions?api-version={self.valves.API_VERSION}"
|
||||
url = f"{self.valves.AZURE_OPENAI_ENDPOINT}/openai/deployments/{self.valves.AZURE_OPENAI_DEPLOYMENT_NAME}/chat/completions?api-version={self.valves.AZURE_OPENAI_API_VERSION}"
|
||||
|
||||
allowed_params = {'messages', 'temperature', 'role', 'content', 'contentPart', 'contentPartImage',
|
||||
'enhancements', 'dataSources', 'n', 'stream', 'stop', 'max_tokens', 'presence_penalty',
|
||||
|
Loading…
Reference in New Issue
Block a user