Fix variable typo (#8084)

This commit is contained in:
Nam Vu
2024-09-08 12:14:11 +07:00
committed by GitHub
parent b1918dae5e
commit 2d7954c7da
215 changed files with 599 additions and 597 deletions

View File

@@ -8,11 +8,11 @@ from core.model_runtime.entities.llm_entities import LLMResult, LLMResultChunk,
from core.model_runtime.entities.message_entities import AssistantPromptMessage, SystemPromptMessage, UserPromptMessage
from core.model_runtime.entities.model_entities import AIModelEntity
from core.model_runtime.errors.validate import CredentialsValidateFailedError
from core.model_runtime.model_providers.baichuan.llm.llm import BaichuanLarguageModel
from core.model_runtime.model_providers.baichuan.llm.llm import BaichuanLanguageModel
def test_predefined_models():
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
model_schemas = model.predefined_models()
assert len(model_schemas) >= 1
assert isinstance(model_schemas[0], AIModelEntity)
@@ -20,7 +20,7 @@ def test_predefined_models():
def test_validate_credentials_for_chat_model():
sleep(3)
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
with pytest.raises(CredentialsValidateFailedError):
model.validate_credentials(
@@ -38,7 +38,7 @@ def test_validate_credentials_for_chat_model():
def test_invoke_model():
sleep(3)
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
response = model.invoke(
model="baichuan2-turbo",
@@ -64,7 +64,7 @@ def test_invoke_model():
def test_invoke_model_with_system_message():
sleep(3)
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
response = model.invoke(
model="baichuan2-turbo",
@@ -93,7 +93,7 @@ def test_invoke_model_with_system_message():
def test_invoke_stream_model():
sleep(3)
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
response = model.invoke(
model="baichuan2-turbo",
@@ -122,7 +122,7 @@ def test_invoke_stream_model():
def test_invoke_with_search():
sleep(3)
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
response = model.invoke(
model="baichuan2-turbo",
@@ -156,7 +156,7 @@ def test_invoke_with_search():
def test_get_num_tokens():
sleep(3)
model = BaichuanLarguageModel()
model = BaichuanLanguageModel()
response = model.get_num_tokens(
model="baichuan2-turbo",