Remove extra base model (#7213)

<!-- Thank you for contributing to LangChain!

Replace this comment with:
  - Description: a description of the change, 
  - Issue: the issue # it fixes (if applicable),
  - Dependencies: any dependencies required for this change,
- Tag maintainer: for a quicker response, tag the relevant maintainer
(see below),
- Twitter handle: we announce bigger features on Twitter. If your PR
gets announced and you'd like a mention, we'll gladly shout you out!

If you're adding a new integration, please include:
1. a test for the integration, preferably unit tests that do not rely on
network access,
  2. an example notebook showing its use.

Maintainer responsibilities:
  - General / Misc / if you don't know who to tag: @baskaryan
  - DataLoaders / VectorStores / Retrievers: @rlancemartin, @eyurtsev
  - Models / Prompts: @hwchase17, @baskaryan
  - Memory: @hwchase17
  - Agents / Tools / Toolkits: @hinthornw
  - Tracing / Callbacks: @agola11
  - Async: @agola11

If no one reviews your PR within a few days, feel free to @-mention the
same people again.

See contribution guidelines for more information on how to write/run
tests, lint, etc:
https://github.com/hwchase17/langchain/blob/master/.github/CONTRIBUTING.md
 -->
pull/7218/head
Nuno Campos 1 year ago committed by GitHub
parent 6f358bb04a
commit 26409b01bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -18,7 +18,7 @@ from typing import (
)
import numpy as np
from pydantic import BaseModel, root_validator
from pydantic import root_validator
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
@ -475,7 +475,7 @@ class AzureSearch(VectorStore):
return azure_search
class AzureSearchVectorStoreRetriever(BaseRetriever, BaseModel):
class AzureSearchVectorStoreRetriever(BaseRetriever):
vectorstore: AzureSearch
search_type: str = "hybrid"
k: int = 4

@ -19,7 +19,7 @@ from typing import (
TypeVar,
)
from pydantic import BaseModel, Field, root_validator
from pydantic import Field, root_validator
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
@ -373,7 +373,7 @@ class VectorStore(ABC):
return VectorStoreRetriever(vectorstore=self, **kwargs)
class VectorStoreRetriever(BaseRetriever, BaseModel):
class VectorStoreRetriever(BaseRetriever):
vectorstore: VectorStore
search_type: str = "similarity"
search_kwargs: dict = Field(default_factory=dict)

@ -20,7 +20,7 @@ from typing import (
)
import numpy as np
from pydantic import BaseModel, root_validator
from pydantic import root_validator
from langchain.callbacks.manager import (
AsyncCallbackManagerForRetrieverRun,
@ -599,7 +599,7 @@ class Redis(VectorStore):
return RedisVectorStoreRetriever(vectorstore=self, **kwargs)
class RedisVectorStoreRetriever(VectorStoreRetriever, BaseModel):
class RedisVectorStoreRetriever(VectorStoreRetriever):
vectorstore: Redis
search_type: str = "similarity"
k: int = 4

Loading…
Cancel
Save