mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-27 06:18:05 +00:00
community: model config cassandradatabasetool (#26296)
This commit is contained in:
@@ -7,7 +7,7 @@ from typing import TYPE_CHECKING, Any, Dict, Optional, Sequence, Type, Union
|
||||
|
||||
from langchain_core.callbacks import CallbackManagerForToolRun
|
||||
from langchain_core.tools import BaseTool
|
||||
from pydantic import BaseModel, Field
|
||||
from pydantic import BaseModel, ConfigDict, Field
|
||||
|
||||
from langchain_community.utilities.cassandra_database import CassandraDatabase
|
||||
|
||||
@@ -20,6 +20,10 @@ class BaseCassandraDatabaseTool(BaseModel):
|
||||
|
||||
db: CassandraDatabase = Field(exclude=True)
|
||||
|
||||
model_config = ConfigDict(
|
||||
arbitrary_types_allowed=True,
|
||||
)
|
||||
|
||||
|
||||
class _QueryCassandraDatabaseToolInput(BaseModel):
|
||||
query: str = Field(..., description="A detailed and correct CQL query.")
|
||||
|
Reference in New Issue
Block a user