echoconsole 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- echoconsole-0.1.0/LICENSE.txt +7 -0
- echoconsole-0.1.0/PKG-INFO +84 -0
- echoconsole-0.1.0/README.md +55 -0
- echoconsole-0.1.0/echoconsole/__init__.py +0 -0
- echoconsole-0.1.0/echoconsole/anthropic.py +30 -0
- echoconsole-0.1.0/echoconsole/anyscale.py +23 -0
- echoconsole-0.1.0/echoconsole/azure_openai.py +23 -0
- echoconsole-0.1.0/echoconsole/azureml_endpoint.py +30 -0
- echoconsole-0.1.0/echoconsole/b2.py +42 -0
- echoconsole-0.1.0/echoconsole/b3.py +9 -0
- echoconsole-0.1.0/echoconsole/b4.py +17 -0
- echoconsole-0.1.0/echoconsole/baichuan.py +23 -0
- echoconsole-0.1.0/echoconsole/baidu_qianfan_endpoint.py +27 -0
- echoconsole-0.1.0/echoconsole/base_language.py +7 -0
- echoconsole-0.1.0/echoconsole/bedrock.py +27 -0
- echoconsole-0.1.0/echoconsole/cache.py +72 -0
- echoconsole-0.1.0/echoconsole/cohere.py +23 -0
- echoconsole-0.1.0/echoconsole/databricks.py +23 -0
- echoconsole-0.1.0/echoconsole/env.py +17 -0
- echoconsole-0.1.0/echoconsole/ernie.py +23 -0
- echoconsole-0.1.0/echoconsole/everlyai.py +23 -0
- echoconsole-0.1.0/echoconsole/example_generator.py +5 -0
- echoconsole-0.1.0/echoconsole/fake.py +30 -0
- echoconsole-0.1.0/echoconsole/fireworks.py +23 -0
- echoconsole-0.1.0/echoconsole/formatting.py +5 -0
- echoconsole-0.1.0/echoconsole/gigachat.py +23 -0
- echoconsole-0.1.0/echoconsole/google_palm.py +30 -0
- echoconsole-0.1.0/echoconsole/human.py +23 -0
- echoconsole-0.1.0/echoconsole/hunyuan.py +23 -0
- echoconsole-0.1.0/echoconsole/input.py +15 -0
- echoconsole-0.1.0/echoconsole/javelin_ai_gateway.py +30 -0
- echoconsole-0.1.0/echoconsole/jinachat.py +23 -0
- echoconsole-0.1.0/echoconsole/konko.py +23 -0
- echoconsole-0.1.0/echoconsole/litellm.py +30 -0
- echoconsole-0.1.0/echoconsole/meta.py +25 -0
- echoconsole-0.1.0/echoconsole/minimax.py +23 -0
- echoconsole-0.1.0/echoconsole/mlflow.py +23 -0
- echoconsole-0.1.0/echoconsole/mlflow_ai_gateway.py +30 -0
- echoconsole-0.1.0/echoconsole/ollama.py +23 -0
- echoconsole-0.1.0/echoconsole/openai.py +23 -0
- echoconsole-0.1.0/echoconsole/pai_eas_endpoint.py +25 -0
- echoconsole-0.1.0/echoconsole/promptlayer_openai.py +25 -0
- echoconsole-0.1.0/echoconsole/python.py +19 -0
- echoconsole-0.1.0/echoconsole/requests.py +35 -0
- echoconsole-0.1.0/echoconsole/s1.py +26 -0
- echoconsole-0.1.0/echoconsole/s10.py +64 -0
- echoconsole-0.1.0/echoconsole/s2.py +46 -0
- echoconsole-0.1.0/echoconsole/s3.py +38 -0
- echoconsole-0.1.0/echoconsole/s4.py +2 -0
- echoconsole-0.1.0/echoconsole/s5.py +9 -0
- echoconsole-0.1.0/echoconsole/s6.py +42 -0
- echoconsole-0.1.0/echoconsole/s7.py +38 -0
- echoconsole-0.1.0/echoconsole/s8.py +47 -0
- echoconsole-0.1.0/echoconsole/s9.py +50 -0
- echoconsole-0.1.0/echoconsole/serpapi.py +25 -0
- echoconsole-0.1.0/echoconsole/sql_database.py +25 -0
- echoconsole-0.1.0/echoconsole/tongyi.py +23 -0
- echoconsole-0.1.0/echoconsole/vertexai.py +23 -0
- echoconsole-0.1.0/echoconsole/volcengine_maas.py +30 -0
- echoconsole-0.1.0/echoconsole/yandex.py +23 -0
- echoconsole-0.1.0/echoconsole.egg-info/PKG-INFO +84 -0
- echoconsole-0.1.0/echoconsole.egg-info/SOURCES.txt +64 -0
- echoconsole-0.1.0/echoconsole.egg-info/dependency_links.txt +1 -0
- echoconsole-0.1.0/echoconsole.egg-info/top_level.txt +1 -0
- echoconsole-0.1.0/setup.cfg +4 -0
- echoconsole-0.1.0/setup.py +31 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
Copyright 2024 EchoCode
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
4
|
+
|
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: echoconsole
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A lightweight personal Python utility package for modular experimentation and structured development.
|
|
5
|
+
Home-page: https://github.com/EchoCode/echoconsole
|
|
6
|
+
Author: EchoCode
|
|
7
|
+
Author-email: echocodepackage@gmail.com
|
|
8
|
+
License: MIT
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE.txt
|
|
19
|
+
Dynamic: author
|
|
20
|
+
Dynamic: author-email
|
|
21
|
+
Dynamic: classifier
|
|
22
|
+
Dynamic: description
|
|
23
|
+
Dynamic: description-content-type
|
|
24
|
+
Dynamic: home-page
|
|
25
|
+
Dynamic: license
|
|
26
|
+
Dynamic: license-file
|
|
27
|
+
Dynamic: requires-python
|
|
28
|
+
Dynamic: summary
|
|
29
|
+
|
|
30
|
+
# echoconsole
|
|
31
|
+
|
|
32
|
+
A lightweight personal Python utility package designed to organize modular components for experimentation and structured development.
|
|
33
|
+
|
|
34
|
+
## Installation
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install echoconsole
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- Clean modular architecture
|
|
43
|
+
- Organized file structure
|
|
44
|
+
- Lightweight and dependency-free
|
|
45
|
+
- Compatible with Python 3.8+
|
|
46
|
+
|
|
47
|
+
## Publish to PyPI
|
|
48
|
+
|
|
49
|
+
1. Build artifacts:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
python -m build
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
2. Create `%USERPROFILE%\\.pypirc` (not inside this repo):
|
|
56
|
+
|
|
57
|
+
```ini
|
|
58
|
+
[distutils]
|
|
59
|
+
index-servers =
|
|
60
|
+
pypi
|
|
61
|
+
|
|
62
|
+
[pypi]
|
|
63
|
+
repository = https://upload.pypi.org/legacy/
|
|
64
|
+
username = __token__
|
|
65
|
+
password = ${PYPI_TOKEN}
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
3. Set token in your shell and upload:
|
|
69
|
+
|
|
70
|
+
```powershell
|
|
71
|
+
$env:PYPI_TOKEN = "pypi-<YOUR_NEW_TOKEN>"
|
|
72
|
+
python -m twine upload -r pypi dist/*
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
4. Clear the token from the session after upload:
|
|
76
|
+
|
|
77
|
+
```powershell
|
|
78
|
+
Remove-Item Env:PYPI_TOKEN
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## License
|
|
82
|
+
|
|
83
|
+
MIT
|
|
84
|
+
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# echoconsole
|
|
2
|
+
|
|
3
|
+
A lightweight personal Python utility package designed to organize modular components for experimentation and structured development.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install echoconsole
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Features
|
|
12
|
+
|
|
13
|
+
- Clean modular architecture
|
|
14
|
+
- Organized file structure
|
|
15
|
+
- Lightweight and dependency-free
|
|
16
|
+
- Compatible with Python 3.8+
|
|
17
|
+
|
|
18
|
+
## Publish to PyPI
|
|
19
|
+
|
|
20
|
+
1. Build artifacts:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
python -m build
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
2. Create `%USERPROFILE%\\.pypirc` (not inside this repo):
|
|
27
|
+
|
|
28
|
+
```ini
|
|
29
|
+
[distutils]
|
|
30
|
+
index-servers =
|
|
31
|
+
pypi
|
|
32
|
+
|
|
33
|
+
[pypi]
|
|
34
|
+
repository = https://upload.pypi.org/legacy/
|
|
35
|
+
username = __token__
|
|
36
|
+
password = ${PYPI_TOKEN}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
3. Set token in your shell and upload:
|
|
40
|
+
|
|
41
|
+
```powershell
|
|
42
|
+
$env:PYPI_TOKEN = "pypi-<YOUR_NEW_TOKEN>"
|
|
43
|
+
python -m twine upload -r pypi dist/*
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
4. Clear the token from the session after upload:
|
|
47
|
+
|
|
48
|
+
```powershell
|
|
49
|
+
Remove-Item Env:PYPI_TOKEN
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## License
|
|
53
|
+
|
|
54
|
+
MIT
|
|
55
|
+
|
|
File without changes
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.anthropic import (
|
|
7
|
+
ChatAnthropic,
|
|
8
|
+
convert_messages_to_prompt_anthropic,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# Create a way to dynamically look up deprecated imports.
|
|
12
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
13
|
+
# handling optional imports.
|
|
14
|
+
DEPRECATED_LOOKUP = {
|
|
15
|
+
"convert_messages_to_prompt_anthropic": "langchain_community.chat_models.anthropic",
|
|
16
|
+
"ChatAnthropic": "langchain_community.chat_models.anthropic",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(name: str) -> Any:
|
|
23
|
+
"""Look up attributes dynamically."""
|
|
24
|
+
return _import_attribute(name)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"ChatAnthropic",
|
|
29
|
+
"convert_messages_to_prompt_anthropic",
|
|
30
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.anyscale import ChatAnyscale
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ChatAnyscale": "langchain_community.chat_models.anyscale"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ChatAnyscale",
|
|
23
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.azure_openai import AzureChatOpenAI
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"AzureChatOpenAI": "langchain_community.chat_models.azure_openai"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"AzureChatOpenAI",
|
|
23
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.azureml_endpoint import (
|
|
7
|
+
AzureMLChatOnlineEndpoint,
|
|
8
|
+
LlamaContentFormatter,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# Create a way to dynamically look up deprecated imports.
|
|
12
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
13
|
+
# handling optional imports.
|
|
14
|
+
DEPRECATED_LOOKUP = {
|
|
15
|
+
"LlamaContentFormatter": "langchain_community.chat_models.azureml_endpoint",
|
|
16
|
+
"AzureMLChatOnlineEndpoint": "langchain_community.chat_models.azureml_endpoint",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(name: str) -> Any:
|
|
23
|
+
"""Look up attributes dynamically."""
|
|
24
|
+
return _import_attribute(name)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"AzureMLChatOnlineEndpoint",
|
|
29
|
+
"LlamaContentFormatter",
|
|
30
|
+
]
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
hdfs --daemon start namenode
|
|
2
|
+
hdfs --daemon start datanode
|
|
3
|
+
yarn --daemon start resourcemanager
|
|
4
|
+
yarn --daemon start nodemanager
|
|
5
|
+
|
|
6
|
+
jps
|
|
7
|
+
|
|
8
|
+
hadoop version
|
|
9
|
+
|
|
10
|
+
hdfs dfs -ls /
|
|
11
|
+
|
|
12
|
+
hdfs dfs -mkdir /data
|
|
13
|
+
|
|
14
|
+
echo "Hello Hadoop" > local.txt
|
|
15
|
+
|
|
16
|
+
hdfs dfs -put local.txt /data/
|
|
17
|
+
|
|
18
|
+
hdfs dfs -ls /data
|
|
19
|
+
|
|
20
|
+
hdfs dfs -get /data/local.txt
|
|
21
|
+
|
|
22
|
+
ls
|
|
23
|
+
|
|
24
|
+
hdfs dfs -cat /data/local.txt
|
|
25
|
+
|
|
26
|
+
hdfs dfs -tail /data/local.txt
|
|
27
|
+
|
|
28
|
+
hdfs dfs -cp /data/local.txt /data/local_copy.txt
|
|
29
|
+
|
|
30
|
+
hdfs dfs -ls /data
|
|
31
|
+
|
|
32
|
+
hdfs dfs -mv /data/local_copy.txt /data/local_renamed.txt
|
|
33
|
+
|
|
34
|
+
hdfs dfs -ls /data
|
|
35
|
+
|
|
36
|
+
hdfs dfs -rm /data/local_renamed.txt
|
|
37
|
+
|
|
38
|
+
hdfs dfs -ls /data
|
|
39
|
+
|
|
40
|
+
hdfs dfs -rm -r /data
|
|
41
|
+
|
|
42
|
+
hdfs dfs -ls /
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
echo "hello hadoop hello mapreduce" > wc_input.txt
|
|
2
|
+
hdfs dfs -mkdir -p /wordcount_input
|
|
3
|
+
hdfs dfs -put -f wc_input.txt /wordcount_input/
|
|
4
|
+
hdfs dfs -ls /
|
|
5
|
+
|
|
6
|
+
hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar wordcount -D mapreduce.job.reduces=2 /wordcount_input /wordcount/output_2reducer
|
|
7
|
+
|
|
8
|
+
hdfs dfs -ls /wordcount/output_2reducer
|
|
9
|
+
hdfs dfs -cat /wordcount/output_2reducer/part-r-*
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Run this
|
|
2
|
+
nano run_maponly.sh
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#then
|
|
6
|
+
echo "hello hadoop hello mapreduce" > wc_input.txt
|
|
7
|
+
echo "mapper only job example in hadoop" >> wc_input.txt
|
|
8
|
+
|
|
9
|
+
hdfs dfs -mkdir -p /wordcount1/input
|
|
10
|
+
hdfs dfs -put -f wc_input.txt /wordcount1/input/
|
|
11
|
+
|
|
12
|
+
hdfs dfs -rm -r -f /wordcount1/output_maponly
|
|
13
|
+
|
|
14
|
+
hadoop jar $HADOOP_HOME/share/hadoop/mapreduce/hadoop-mapreduce-examples-*.jar wordcount -D mapreduce.job.reduces=0 /wordcount1/input /wordcount1/output_maponly
|
|
15
|
+
|
|
16
|
+
hdfs dfs -ls /wordcount1/output_maponly
|
|
17
|
+
hdfs dfs -cat /wordcount1/output_maponly/part-m-*
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.baichuan import ChatBaichuan
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ChatBaichuan": "langchain_community.chat_models.baichuan"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ChatBaichuan",
|
|
23
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.baidu_qianfan_endpoint import (
|
|
7
|
+
QianfanChatEndpoint,
|
|
8
|
+
)
|
|
9
|
+
|
|
10
|
+
# Create a way to dynamically look up deprecated imports.
|
|
11
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
12
|
+
# handling optional imports.
|
|
13
|
+
DEPRECATED_LOOKUP = {
|
|
14
|
+
"QianfanChatEndpoint": "langchain_community.chat_models.baidu_qianfan_endpoint",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def __getattr__(name: str) -> Any:
|
|
21
|
+
"""Look up attributes dynamically."""
|
|
22
|
+
return _import_attribute(name)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
__all__ = [
|
|
26
|
+
"QianfanChatEndpoint",
|
|
27
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.bedrock import BedrockChat, ChatPromptAdapter
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {
|
|
12
|
+
"ChatPromptAdapter": "langchain_community.chat_models.bedrock",
|
|
13
|
+
"BedrockChat": "langchain_community.chat_models.bedrock",
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
def __getattr__(name: str) -> Any:
|
|
20
|
+
"""Look up attributes dynamically."""
|
|
21
|
+
return _import_attribute(name)
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"BedrockChat",
|
|
26
|
+
"ChatPromptAdapter",
|
|
27
|
+
]
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.cache import (
|
|
7
|
+
AstraDBCache,
|
|
8
|
+
AstraDBSemanticCache,
|
|
9
|
+
AzureCosmosDBSemanticCache,
|
|
10
|
+
CassandraCache,
|
|
11
|
+
CassandraSemanticCache,
|
|
12
|
+
FullLLMCache,
|
|
13
|
+
FullMd5LLMCache,
|
|
14
|
+
GPTCache,
|
|
15
|
+
InMemoryCache,
|
|
16
|
+
MomentoCache,
|
|
17
|
+
RedisCache,
|
|
18
|
+
RedisSemanticCache,
|
|
19
|
+
SQLAlchemyCache,
|
|
20
|
+
SQLAlchemyMd5Cache,
|
|
21
|
+
SQLiteCache,
|
|
22
|
+
UpstashRedisCache,
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
# Create a way to dynamically look up deprecated imports.
|
|
26
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
27
|
+
# handling optional imports.
|
|
28
|
+
DEPRECATED_LOOKUP = {
|
|
29
|
+
"FullLLMCache": "langchain_community.cache",
|
|
30
|
+
"SQLAlchemyCache": "langchain_community.cache",
|
|
31
|
+
"SQLiteCache": "langchain_community.cache",
|
|
32
|
+
"UpstashRedisCache": "langchain_community.cache",
|
|
33
|
+
"RedisCache": "langchain_community.cache",
|
|
34
|
+
"RedisSemanticCache": "langchain_community.cache",
|
|
35
|
+
"GPTCache": "langchain_community.cache",
|
|
36
|
+
"MomentoCache": "langchain_community.cache",
|
|
37
|
+
"InMemoryCache": "langchain_community.cache",
|
|
38
|
+
"CassandraCache": "langchain_community.cache",
|
|
39
|
+
"CassandraSemanticCache": "langchain_community.cache",
|
|
40
|
+
"FullMd5LLMCache": "langchain_community.cache",
|
|
41
|
+
"SQLAlchemyMd5Cache": "langchain_community.cache",
|
|
42
|
+
"AstraDBCache": "langchain_community.cache",
|
|
43
|
+
"AstraDBSemanticCache": "langchain_community.cache",
|
|
44
|
+
"AzureCosmosDBSemanticCache": "langchain_community.cache",
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def __getattr__(name: str) -> Any:
|
|
51
|
+
"""Look up attributes dynamically."""
|
|
52
|
+
return _import_attribute(name)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
__all__ = [
|
|
56
|
+
"AstraDBCache",
|
|
57
|
+
"AstraDBSemanticCache",
|
|
58
|
+
"AzureCosmosDBSemanticCache",
|
|
59
|
+
"CassandraCache",
|
|
60
|
+
"CassandraSemanticCache",
|
|
61
|
+
"FullLLMCache",
|
|
62
|
+
"FullMd5LLMCache",
|
|
63
|
+
"GPTCache",
|
|
64
|
+
"InMemoryCache",
|
|
65
|
+
"MomentoCache",
|
|
66
|
+
"RedisCache",
|
|
67
|
+
"RedisSemanticCache",
|
|
68
|
+
"SQLAlchemyCache",
|
|
69
|
+
"SQLAlchemyMd5Cache",
|
|
70
|
+
"SQLiteCache",
|
|
71
|
+
"UpstashRedisCache",
|
|
72
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.cohere import ChatCohere
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ChatCohere": "langchain_community.chat_models.cohere"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ChatCohere",
|
|
23
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.databricks import ChatDatabricks
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ChatDatabricks": "langchain_community.chat_models.databricks"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ChatDatabricks",
|
|
23
|
+
]
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import platform
|
|
2
|
+
from functools import lru_cache
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
@lru_cache(maxsize=1)
|
|
6
|
+
def get_runtime_environment() -> dict:
|
|
7
|
+
"""Get information about the LangChain runtime environment."""
|
|
8
|
+
# Lazy import to avoid circular imports
|
|
9
|
+
from langchain import __version__
|
|
10
|
+
|
|
11
|
+
return {
|
|
12
|
+
"library_version": __version__,
|
|
13
|
+
"library": "langchain",
|
|
14
|
+
"platform": platform.platform(),
|
|
15
|
+
"runtime": "python",
|
|
16
|
+
"runtime_version": platform.python_version(),
|
|
17
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.ernie import ErnieBotChat
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ErnieBotChat": "langchain_community.chat_models.ernie"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ErnieBotChat",
|
|
23
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.everlyai import ChatEverlyAI
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ChatEverlyAI": "langchain_community.chat_models.everlyai"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ChatEverlyAI",
|
|
23
|
+
]
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.fake import (
|
|
7
|
+
FakeListChatModel,
|
|
8
|
+
FakeMessagesListChatModel,
|
|
9
|
+
)
|
|
10
|
+
|
|
11
|
+
# Create a way to dynamically look up deprecated imports.
|
|
12
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
13
|
+
# handling optional imports.
|
|
14
|
+
DEPRECATED_LOOKUP = {
|
|
15
|
+
"FakeMessagesListChatModel": "langchain_community.chat_models.fake",
|
|
16
|
+
"FakeListChatModel": "langchain_community.chat_models.fake",
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def __getattr__(name: str) -> Any:
|
|
23
|
+
"""Look up attributes dynamically."""
|
|
24
|
+
return _import_attribute(name)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
__all__ = [
|
|
28
|
+
"FakeListChatModel",
|
|
29
|
+
"FakeMessagesListChatModel",
|
|
30
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
from typing import TYPE_CHECKING, Any
|
|
2
|
+
|
|
3
|
+
from langchain._api import create_importer
|
|
4
|
+
|
|
5
|
+
if TYPE_CHECKING:
|
|
6
|
+
from langchain_community.chat_models.fireworks import ChatFireworks
|
|
7
|
+
|
|
8
|
+
# Create a way to dynamically look up deprecated imports.
|
|
9
|
+
# Used to consolidate logic for raising deprecation warnings and
|
|
10
|
+
# handling optional imports.
|
|
11
|
+
DEPRECATED_LOOKUP = {"ChatFireworks": "langchain_community.chat_models.fireworks"}
|
|
12
|
+
|
|
13
|
+
_import_attribute = create_importer(__package__, deprecated_lookups=DEPRECATED_LOOKUP)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def __getattr__(name: str) -> Any:
|
|
17
|
+
"""Look up attributes dynamically."""
|
|
18
|
+
return _import_attribute(name)
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
__all__ = [
|
|
22
|
+
"ChatFireworks",
|
|
23
|
+
]
|