Merge branch 'main' into feat/new-login

* main: (40 commits)
  feat: allow users to specify timeout for text generations and workflows by environment variable (#8395)
  Fix: operation postion of answer in logs (#8411)
  fix: when the variable does not exist, an error should be prompted (#8413)
  fix(workflow): the answer node after the iteration node containing the answer was output prematurely (#8419)
  fix:logs and rm unused codes in CacheEmbedding (#8409)
  fix: resolve runtime error when self.folder is None (#8401)
  Fix: Support Bedrock cross region inference #8190 (Update Model name to distinguish between different region groups) (#8402)
  fix(docker): aliyun oss path env key (#8394)
  fix: pyproject.toml typo (#8396)
  fix: o1-mini 65563 -> 65536 (#8388)
  fix: sandbox issue related httpx and requests (#8397)
  chore: improve usage of striping prefix or suffix of string with Ruff 0.6.5 (#8392)
  fix (#8322 followup): resolve the violation of pylint rules (#8391)
  chore: refurish python code by applying Pylint linter rules (#8322)
  support hunyuan-turbo (#8372)
  chore: update firecrawl scrape to V1 api (#8367)
  fix(workflow): both parallel and single branch errors occur in if-else (#8378)
  fix: edit load balancing not pass id (#8370)
  fix: add before send to remove langfuse defaultErrorResponse (#8361)
  fix: when edit load balancing config not pass the empty filed value hidden (#8366)
  ...
This commit is contained in:
Joe
2024-09-14 14:53:11 +08:00
274 changed files with 2303 additions and 1475 deletions

View File

@ -37,6 +37,6 @@ def parse_and_check_json_markdown(text: str, expected_keys: list[str]) -> dict:
for key in expected_keys:
if key not in json_obj:
raise OutputParserError(
f"Got invalid return object. Expected key `{key}` " f"to be present, but got {json_obj}"
f"Got invalid return object. Expected key `{key}` to be present, but got {json_obj}"
)
return json_obj

View File

@ -158,7 +158,7 @@ class NotionOAuth(OAuthDataSource):
page_icon = page_result["icon"]
if page_icon:
icon_type = page_icon["type"]
if icon_type == "external" or icon_type == "file":
if icon_type in {"external", "file"}:
url = page_icon[icon_type]["url"]
icon = {"type": "url", "url": url if url.startswith("http") else f"https://www.notion.so{url}"}
else:
@ -191,7 +191,7 @@ class NotionOAuth(OAuthDataSource):
page_icon = database_result["icon"]
if page_icon:
icon_type = page_icon["type"]
if icon_type == "external" or icon_type == "file":
if icon_type in {"external", "file"}:
url = page_icon[icon_type]["url"]
icon = {"type": "url", "url": url if url.startswith("http") else f"https://www.notion.so{url}"}
else:

View File

@ -4,9 +4,9 @@ from Crypto.Cipher import AES
from Crypto.PublicKey import RSA
from Crypto.Random import get_random_bytes
import libs.gmpy2_pkcs10aep_cipher as gmpy2_pkcs10aep_cipher
from extensions.ext_redis import redis_client
from extensions.ext_storage import storage
from libs import gmpy2_pkcs10aep_cipher
def generate_key_pair(tenant_id):