randomcode 0.1.0__py3-none-any.whl

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.
Files changed (59) hide show
  1. randomcode/__init__.py +0 -0
  2. randomcode/anthropic.py +30 -0
  3. randomcode/anyscale.py +23 -0
  4. randomcode/azure_openai.py +23 -0
  5. randomcode/azureml_endpoint.py +30 -0
  6. randomcode/baichuan.py +23 -0
  7. randomcode/baidu_qianfan_endpoint.py +27 -0
  8. randomcode/base_language.py +7 -0
  9. randomcode/bedrock.py +27 -0
  10. randomcode/cache.py +72 -0
  11. randomcode/cohere.py +23 -0
  12. randomcode/databricks.py +23 -0
  13. randomcode/env.py +17 -0
  14. randomcode/ernie.py +23 -0
  15. randomcode/everlyai.py +23 -0
  16. randomcode/example_generator.py +5 -0
  17. randomcode/fake.py +30 -0
  18. randomcode/fireworks.py +23 -0
  19. randomcode/formatting.py +5 -0
  20. randomcode/gigachat.py +23 -0
  21. randomcode/google_palm.py +30 -0
  22. randomcode/human.py +23 -0
  23. randomcode/hunyuan.py +23 -0
  24. randomcode/input.py +15 -0
  25. randomcode/javelin_ai_gateway.py +30 -0
  26. randomcode/jinachat.py +23 -0
  27. randomcode/konko.py +23 -0
  28. randomcode/litellm.py +30 -0
  29. randomcode/meta.py +25 -0
  30. randomcode/minimax.py +23 -0
  31. randomcode/mlflow.py +23 -0
  32. randomcode/mlflow_ai_gateway.py +30 -0
  33. randomcode/ollama.py +23 -0
  34. randomcode/openai.py +23 -0
  35. randomcode/pai_eas_endpoint.py +25 -0
  36. randomcode/promptlayer_openai.py +25 -0
  37. randomcode/python.py +19 -0
  38. randomcode/requests.py +35 -0
  39. randomcode/s1.py +28 -0
  40. randomcode/s10.py +56 -0
  41. randomcode/s2.py +49 -0
  42. randomcode/s3.py +37 -0
  43. randomcode/s4.py +19 -0
  44. randomcode/s5.py +28 -0
  45. randomcode/s6.py +44 -0
  46. randomcode/s7.py +46 -0
  47. randomcode/s8.py +53 -0
  48. randomcode/s9.py +45 -0
  49. randomcode/serpapi.py +25 -0
  50. randomcode/sql_database.py +25 -0
  51. randomcode/tongyi.py +23 -0
  52. randomcode/vertexai.py +23 -0
  53. randomcode/volcengine_maas.py +30 -0
  54. randomcode/yandex.py +23 -0
  55. randomcode-0.1.0.dist-info/METADATA +84 -0
  56. randomcode-0.1.0.dist-info/RECORD +59 -0
  57. randomcode-0.1.0.dist-info/WHEEL +5 -0
  58. randomcode-0.1.0.dist-info/licenses/LICENSE.txt +7 -0
  59. randomcode-0.1.0.dist-info/top_level.txt +1 -0
randomcode/__init__.py ADDED
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
+ ]
randomcode/anyscale.py ADDED
@@ -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
+ ]
randomcode/baichuan.py ADDED
@@ -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,7 @@
1
+ """Deprecated module for BaseLanguageModel class, kept for backwards compatibility."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from langchain_core.language_models import BaseLanguageModel
6
+
7
+ __all__ = ["BaseLanguageModel"]
randomcode/bedrock.py ADDED
@@ -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
+ ]
randomcode/cache.py ADDED
@@ -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
+ ]
randomcode/cohere.py ADDED
@@ -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
+ ]
randomcode/env.py ADDED
@@ -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
+ }
randomcode/ernie.py ADDED
@@ -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
+ ]
randomcode/everlyai.py ADDED
@@ -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,5 @@
1
+ """Keep here for backwards compatibility."""
2
+
3
+ from langchain.chains.example_generator import generate_example
4
+
5
+ __all__ = ["generate_example"]
randomcode/fake.py ADDED
@@ -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
+ ]
@@ -0,0 +1,5 @@
1
+ """DEPRECATED: Kept for backwards compatibility."""
2
+
3
+ from langchain_core.utils.formatting import StrictFormatter, formatter
4
+
5
+ __all__ = ["StrictFormatter", "formatter"]
randomcode/gigachat.py ADDED
@@ -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.gigachat import GigaChat
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 = {"GigaChat": "langchain_community.chat_models.gigachat"}
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
+ "GigaChat",
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.google_palm import (
7
+ ChatGooglePalm,
8
+ ChatGooglePalmError,
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
+ "ChatGooglePalm": "langchain_community.chat_models.google_palm",
16
+ "ChatGooglePalmError": "langchain_community.chat_models.google_palm",
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
+ "ChatGooglePalm",
29
+ "ChatGooglePalmError",
30
+ ]
randomcode/human.py ADDED
@@ -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.human import HumanInputChatModel
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 = {"HumanInputChatModel": "langchain_community.chat_models.human"}
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
+ "HumanInputChatModel",
23
+ ]
randomcode/hunyuan.py ADDED
@@ -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.hunyuan import ChatHunyuan
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 = {"ChatHunyuan": "langchain_community.chat_models.hunyuan"}
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
+ "ChatHunyuan",
23
+ ]
randomcode/input.py ADDED
@@ -0,0 +1,15 @@
1
+ """DEPRECATED: Kept for backwards compatibility."""
2
+
3
+ from langchain_core.utils.input import (
4
+ get_bolded_text,
5
+ get_color_mapping,
6
+ get_colored_text,
7
+ print_text,
8
+ )
9
+
10
+ __all__ = [
11
+ "get_bolded_text",
12
+ "get_color_mapping",
13
+ "get_colored_text",
14
+ "print_text",
15
+ ]
@@ -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.javelin_ai_gateway import (
7
+ ChatJavelinAIGateway,
8
+ ChatParams,
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
+ "ChatJavelinAIGateway": "langchain_community.chat_models.javelin_ai_gateway",
16
+ "ChatParams": "langchain_community.chat_models.javelin_ai_gateway",
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
+ "ChatJavelinAIGateway",
29
+ "ChatParams",
30
+ ]
randomcode/jinachat.py ADDED
@@ -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.jinachat import JinaChat
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 = {"JinaChat": "langchain_community.chat_models.jinachat"}
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
+ "JinaChat",
23
+ ]
randomcode/konko.py ADDED
@@ -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.konko import ChatKonko
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 = {"ChatKonko": "langchain_community.chat_models.konko"}
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
+ "ChatKonko",
23
+ ]