Skip to content
Snippets Groups Projects
Unverified Commit 74624dd5 authored by zlog's avatar zlog Committed by GitHub
Browse files

feat: Resolving UserWarning about llama-index-llms-dashscope (#16965)


* feat: Resolving UserWarning about llama-index-llms-dashscope

In Pydantic V2, protected_namespaces is a configuration option used to prevent certain namespace keywords
          (such as model_, etc.) from being used as field names. so we need to disable it here.

* Update pyproject.toml

update version to 0.2.6

* lint

---------

Co-authored-by: default avatarAndrei Fajardo <andrei@nerdai.io>
parent 8b814ae8
No related branches found
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
from http import HTTPStatus
from typing import Any, Dict, List, Optional, Sequence, Tuple
from pydantic import ConfigDict
from llama_index.core.base.llms.types import (
ChatMessage,
......@@ -121,6 +122,11 @@ class DashScope(CustomLLM):
```
"""
""" In Pydantic V2, protected_namespaces is a configuration option used to prevent certain namespace keywords
(such as model_, etc.) from being used as field names. so we need to disable it here.
"""
model_config = ConfigDict(protected_namespaces=())
model_name: str = Field(
default=DashScopeGenerationModels.QWEN_MAX,
description="The DashScope model to use.",
......
......@@ -27,7 +27,7 @@ exclude = ["**/BUILD"]
license = "MIT"
name = "llama-index-llms-dashscope"
readme = "README.md"
version = "0.2.5"
version = "0.2.6"
[tool.poetry.dependencies]
python = ">=3.8.1,<4.0"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment