feat: create_llm 传递 disable_streaming
This commit is contained in:
@@ -6,7 +6,11 @@ from app.config.ai_configs import ai_configs
|
|||||||
from app.utils.LLamaIndexEmbeddings import LLamaIndexEmbeddings
|
from app.utils.LLamaIndexEmbeddings import LLamaIndexEmbeddings
|
||||||
|
|
||||||
|
|
||||||
def create_llm(platform_code='huoshan-doubao', temperature=0.5):
|
def create_llm(
|
||||||
|
platform_code='huoshan-doubao',
|
||||||
|
temperature=0.5,
|
||||||
|
disable_streaming=False,
|
||||||
|
):
|
||||||
_ai_config = ai_configs.get(platform_code)
|
_ai_config = ai_configs.get(platform_code)
|
||||||
|
|
||||||
if _ai_config is None:
|
if _ai_config is None:
|
||||||
@@ -17,6 +21,7 @@ def create_llm(platform_code='huoshan-doubao', temperature=0.5):
|
|||||||
api_key=_ai_config.get('key'),
|
api_key=_ai_config.get('key'),
|
||||||
model=_ai_config.get('model'),
|
model=_ai_config.get('model'),
|
||||||
temperature=temperature,
|
temperature=temperature,
|
||||||
|
disable_streaming=disable_streaming,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user