Skip to content

Commit

Permalink
add run name for query constructor (langchain-ai#18101)
Browse files Browse the repository at this point in the history
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
  • Loading branch information
2 people authored and gkorland committed Mar 30, 2024
1 parent de27200 commit e5d2f1d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libs/langchain/langchain/retrievers/self_query/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
from langchain.retrievers.self_query.weaviate import WeaviateTranslator

logger = logging.getLogger(__name__)
QUERY_CONSTRUCTOR_RUN_NAME = "query_constructor"


def _get_builtin_translator(vectorstore: VectorStore) -> Visitor:
Expand Down Expand Up @@ -244,6 +245,9 @@ def from_llm(
enable_limit=enable_limit,
**chain_kwargs,
)
query_constructor = query_constructor.with_config(
run_name=QUERY_CONSTRUCTOR_RUN_NAME
)
return cls(
query_constructor=query_constructor,
vectorstore=vectorstore,
Expand Down

0 comments on commit e5d2f1d

Please sign in to comment.