mirror of
https://git.mirrors.martin98.com/https://github.com/infiniflow/ragflow.git
synced 2025-04-22 06:00:00 +08:00
move import positions (#2753)
### What problem does this PR solve? ### Type of change - [x] Refactoring
This commit is contained in:
parent
16472eb3ea
commit
7f44cf543a
@ -18,7 +18,6 @@ from typing import Optional
|
|||||||
import threading
|
import threading
|
||||||
import requests
|
import requests
|
||||||
from huggingface_hub import snapshot_download
|
from huggingface_hub import snapshot_download
|
||||||
from openai.lib.azure import AzureOpenAI
|
|
||||||
from zhipuai import ZhipuAI
|
from zhipuai import ZhipuAI
|
||||||
import os
|
import os
|
||||||
from abc import ABC
|
from abc import ABC
|
||||||
@ -137,6 +136,7 @@ class LocalAIEmbed(Base):
|
|||||||
|
|
||||||
class AzureEmbed(OpenAIEmbed):
|
class AzureEmbed(OpenAIEmbed):
|
||||||
def __init__(self, key, model_name, **kwargs):
|
def __init__(self, key, model_name, **kwargs):
|
||||||
|
from openai.lib.azure import AzureOpenAI
|
||||||
self.client = AzureOpenAI(api_key=key, azure_endpoint=kwargs["base_url"], api_version="2024-02-01")
|
self.client = AzureOpenAI(api_key=key, azure_endpoint=kwargs["base_url"], api_version="2024-02-01")
|
||||||
self.model_name = model_name
|
self.model_name = model_name
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user