langroid 0.2.7__tar.gz → 0.2.9__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.
- {langroid-0.2.7 → langroid-0.2.9}/PKG-INFO +1 -1
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/__init__.py +2 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/openai_gpt.py +17 -0
- {langroid-0.2.7 → langroid-0.2.9}/pyproject.toml +1 -1
- {langroid-0.2.7 → langroid-0.2.9}/LICENSE +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/README.md +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/base.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/batch.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/callbacks/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/callbacks/chainlit.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/chat_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/chat_document.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/helpers.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/junk +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/openai_assistant.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/doc_chat_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/lance_doc_chat_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/lance_rag/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/lance_rag/critic_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/lance_rag/lance_rag_task.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/lance_rag/query_planner_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/lance_tools.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/neo4j/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/neo4j/csv_kg_chat.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/neo4j/neo4j_chat_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/neo4j/utils/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/neo4j/utils/system_message.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/relevance_extractor_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/retriever_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/sql_chat_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/utils/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/utils/description_extractors.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/utils/populate_metadata.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/utils/system_message.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/utils/tools.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/table_chat_agent.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/task.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tool_message.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/duckduckgo_search_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/extract_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/generator_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/google_search_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/metaphor_search_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/note_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/recipient_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/retrieval_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/rewind_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/run_python_code.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent/tools/segment_extract_tool.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/agent_config.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/cachedb/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/cachedb/base.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/cachedb/momento_cachedb.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/cachedb/redis_cachedb.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/base.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/clustering.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/models.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/protoc/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/protoc/embeddings.proto +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/protoc/embeddings_pb2.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/protoc/embeddings_pb2.pyi +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/protoc/embeddings_pb2_grpc.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/embedding_models/remote_embeds.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/exceptions.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/azure_openai.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/base.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/config.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/mock_lm.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/prompt_formatter/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/prompt_formatter/base.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/prompt_formatter/hf_formatter.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/prompt_formatter/llama2_formatter.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/utils.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/mytypes.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/agent_chats.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/code-parsing.md +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/code_parser.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/config.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/document_parser.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/image_text.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/para_sentence_split.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/parse_json.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/parser.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/repo_loader.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/routing.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/search.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/spider.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/table_loader.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/url_loader.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/url_loader_cookies.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/urls.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/utils.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/parsing/web_search.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/prompts/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/prompts/chat-gpt4-system-prompt.md +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/prompts/dialog.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/prompts/prompts_config.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/prompts/templates.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/pydantic_v1/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/pydantic_v1/main.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/algorithms/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/algorithms/graph.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/configuration.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/constants.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/docker.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/globals.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/llms/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/llms/strings.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/logging.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/object_registry.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/output/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/output/citations.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/output/printing.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/output/status.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/pandas_utils.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/pydantic_utils.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/system.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/web/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/utils/web/login.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/__init__.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/base.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/chromadb.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/lancedb.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/meilisearch.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/momento.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/qdrant_cloud.py +0 -0
- {langroid-0.2.7 → langroid-0.2.9}/langroid/vector_store/qdrantdb.py +0 -0
@@ -16,6 +16,7 @@ from .base import (
|
|
16
16
|
)
|
17
17
|
from .openai_gpt import (
|
18
18
|
OpenAIChatModel,
|
19
|
+
AnthropicModel,
|
19
20
|
OpenAICompletionModel,
|
20
21
|
OpenAIGPTConfig,
|
21
22
|
OpenAIGPT,
|
@@ -39,6 +40,7 @@ __all__ = [
|
|
39
40
|
"LLMTokenUsage",
|
40
41
|
"LLMResponse",
|
41
42
|
"OpenAIChatModel",
|
43
|
+
"AnthropicModel",
|
42
44
|
"OpenAICompletionModel",
|
43
45
|
"OpenAIGPTConfig",
|
44
46
|
"OpenAIGPT",
|
@@ -65,6 +65,15 @@ OLLAMA_API_KEY = "ollama"
|
|
65
65
|
DUMMY_API_KEY = "xxx"
|
66
66
|
|
67
67
|
|
68
|
+
class AnthropicModel(str, Enum):
|
69
|
+
"""Enum for Anthropic models"""
|
70
|
+
|
71
|
+
CLAUDE_3_5_SONNET = "claude-3-5-sonnet-20240620"
|
72
|
+
CLAUDE_3_OPUS = "claude-3-opus-20240229"
|
73
|
+
CLAUDE_3_SONNET = "claude-3-sonnet-20240229"
|
74
|
+
CLAUDE_3_HAIKU = "claude-3-turbo-20240307"
|
75
|
+
|
76
|
+
|
68
77
|
class OpenAIChatModel(str, Enum):
|
69
78
|
"""Enum for OpenAI Chat models"""
|
70
79
|
|
@@ -90,6 +99,10 @@ _context_length: Dict[str, int] = {
|
|
90
99
|
OpenAIChatModel.GPT4_TURBO: 128_000,
|
91
100
|
OpenAIChatModel.GPT4o: 128_000,
|
92
101
|
OpenAICompletionModel.TEXT_DA_VINCI_003: 4096,
|
102
|
+
AnthropicModel.CLAUDE_3_5_SONNET: 200_000,
|
103
|
+
AnthropicModel.CLAUDE_3_OPUS: 200_000,
|
104
|
+
AnthropicModel.CLAUDE_3_SONNET: 200_000,
|
105
|
+
AnthropicModel.CLAUDE_3_HAIKU: 200_000,
|
93
106
|
}
|
94
107
|
|
95
108
|
_cost_per_1k_tokens: Dict[str, Tuple[float, float]] = {
|
@@ -99,6 +112,10 @@ _cost_per_1k_tokens: Dict[str, Tuple[float, float]] = {
|
|
99
112
|
OpenAIChatModel.GPT4: (0.03, 0.06), # 8K context
|
100
113
|
OpenAIChatModel.GPT4_TURBO: (0.01, 0.03), # 128K context
|
101
114
|
OpenAIChatModel.GPT4o: (0.005, 0.015), # 128K context
|
115
|
+
AnthropicModel.CLAUDE_3_5_SONNET: (0.003, 0.015),
|
116
|
+
AnthropicModel.CLAUDE_3_OPUS: (0.015, 0.075),
|
117
|
+
AnthropicModel.CLAUDE_3_SONNET: (0.003, 0.015),
|
118
|
+
AnthropicModel.CLAUDE_3_HAIKU: (0.00025, 0.00125),
|
102
119
|
}
|
103
120
|
|
104
121
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langroid-0.2.7 → langroid-0.2.9}/langroid/agent/special/sql/utils/description_extractors.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langroid-0.2.7 → langroid-0.2.9}/langroid/language_models/prompt_formatter/llama2_formatter.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|