fix: Azure OpenAI o1 max_completion_token and get_num_token_from_messages error (#9326)

Co-authored-by: wwwc <wwwc@outlook.com>
This commit is contained in:
Warren Wong
2024-10-15 16:26:44 +08:00
committed by GitHub
parent fb32e5ca9a
commit b597a0d31c
9 changed files with 638 additions and 381 deletions

View File

@@ -86,10 +86,19 @@ ignore = [
]
"tests/*" = [
"F811", # redefined-while-unused
"F401", # unused-import
"PT001", # missing-function-docstring
"PT004", # missing-parameter-docstring
]
"core/rag/extractor/word_extractor.py" = [
"RUF100", # Unused `noqa` directive
]
"core/tools/provider/builtin/gitlab/tools/gitlab_commits.py" = [
"PLR1714", # Consider merging multiple comparisons
]
[tool.ruff.lint.pyflakes]
allowed-unused-imports=[
extend-generics=[
"_pytest.monkeypatch",
"tests.integration_tests",
]
@@ -149,7 +158,7 @@ nomic = "~3.1.2"
novita-client = "~0.5.7"
numpy = "~1.26.4"
oci = "~2.135.1"
openai = "~1.29.0"
openai = "~1.51.2"
openpyxl = "~3.1.5"
pandas = { version = "~2.2.2", extras = ["performance", "excel"] }
psycopg2-binary = "~2.9.6"
@@ -172,7 +181,7 @@ scikit-learn = "~1.5.1"
sentry-sdk = { version = "~1.44.1", extras = ["flask"] }
sqlalchemy = "~2.0.29"
tencentcloud-sdk-python-hunyuan = "~3.0.1158"
tiktoken = "~0.7.0"
tiktoken = "~0.8.0"
tokenizers = "~0.15.0"
transformers = "~4.35.0"
unstructured = { version = "~0.10.27", extras = ["docx", "epub", "md", "msg", "ppt", "pptx"] }