-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli[minor]: Add __version__ to integration package template (#19876)
Packages should export __version__
- Loading branch information
Showing
1 changed file
with
11 additions
and
1 deletion.
There are no files selected for viewing
12 changes: 11 additions & 1 deletion
12
libs/cli/langchain_cli/integration_template/integration_template/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,21 @@ | ||
from importlib import metadata | ||
|
||
from __module_name__.chat_models import Chat__ModuleName__ | ||
from __module_name__.embeddings import __ModuleName__Embeddings | ||
from __module_name__.llms import __ModuleName__LLM | ||
from __module_name__.vectorstores import __ModuleName__VectorStore | ||
|
||
try: | ||
__version__ = metadata.version(__package__) | ||
except metadata.PackageNotFoundError: | ||
# Case where package metadata is not available. | ||
__version__ = "" | ||
del metadata # optional, avoids polluting the results of dir(__package__) | ||
|
||
__all__ = [ | ||
"__ModuleName__LLM", | ||
"Chat__ModuleName__", | ||
"__ModuleName__LLM", | ||
"__ModuleName__VectorStore", | ||
"__ModuleName__Embeddings", | ||
"__version__", | ||
] |