mirror of
https://github.com/infiniflow/ragflow.git
synced 2025-12-08 20:42:30 +08:00
refine xinference (#2521)
### What problem does this PR solve? #1588 ### Type of change - [x] Refactoring
This commit is contained in:
@ -268,6 +268,8 @@ class FastEmbed(Base):
|
||||
|
||||
class XinferenceEmbed(Base):
|
||||
def __init__(self, key, model_name="", base_url=""):
|
||||
if base_url.split("/")[-1] != "v1":
|
||||
base_url = os.path.join(base_url, "v1")
|
||||
self.client = OpenAI(api_key="xxx", base_url=base_url)
|
||||
self.model_name = model_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user