🐛 fix(BaiduQianfanChatEndpoints.py): add type ignore comments to fix type errors
🐛 fix(BaiduQianfanLLMEndpoints.py): add type ignore comments to fix type errors
This commit is contained in:
parent
e2cf4f0234
commit
9b36e64c57
2 changed files with 4 additions and 4 deletions
|
|
@ -78,7 +78,7 @@ class QianfanChatEndpointComponent(CustomComponent):
|
||||||
endpoint: Optional[str] = None,
|
endpoint: Optional[str] = None,
|
||||||
) -> BaseLLM:
|
) -> BaseLLM:
|
||||||
try:
|
try:
|
||||||
output = QianfanChatEndpoint(
|
output = QianfanChatEndpoint( # type: ignore
|
||||||
model=model,
|
model=model,
|
||||||
qianfan_ak=qianfan_ak,
|
qianfan_ak=qianfan_ak,
|
||||||
qianfan_sk=qianfan_sk,
|
qianfan_sk=qianfan_sk,
|
||||||
|
|
@ -89,4 +89,4 @@ class QianfanChatEndpointComponent(CustomComponent):
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ValueError("Could not connect to Baidu Qianfan API.") from e
|
raise ValueError("Could not connect to Baidu Qianfan API.") from e
|
||||||
return output
|
return output # type: ignore
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ class QianfanLLMEndpointComponent(CustomComponent):
|
||||||
endpoint: Optional[str] = None,
|
endpoint: Optional[str] = None,
|
||||||
) -> BaseLLM:
|
) -> BaseLLM:
|
||||||
try:
|
try:
|
||||||
output = QianfanLLMEndpoint(
|
output = QianfanLLMEndpoint( # type: ignore
|
||||||
model=model,
|
model=model,
|
||||||
qianfan_ak=qianfan_ak,
|
qianfan_ak=qianfan_ak,
|
||||||
qianfan_sk=qianfan_sk,
|
qianfan_sk=qianfan_sk,
|
||||||
|
|
@ -89,4 +89,4 @@ class QianfanLLMEndpointComponent(CustomComponent):
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
raise ValueError("Could not connect to Baidu Qianfan API.") from e
|
raise ValueError("Could not connect to Baidu Qianfan API.") from e
|
||||||
return output
|
return output # type: ignore
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue