agentica 0.1.2__tar.gz → 0.1.3__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.
Files changed (93) hide show
  1. {agentica-0.1.2 → agentica-0.1.3}/PKG-INFO +14 -3
  2. {agentica-0.1.2 → agentica-0.1.3}/README.md +13 -2
  3. {agentica-0.1.2 → agentica-0.1.3}/agentica/config.py +4 -5
  4. {agentica-0.1.2 → agentica-0.1.3}/agentica/file/base.py +7 -2
  5. {agentica-0.1.2 → agentica-0.1.3}/agentica/file/csv.py +8 -2
  6. {agentica-0.1.2 → agentica-0.1.3}/agentica/file/txt.py +8 -2
  7. agentica-0.1.3/agentica/version.py +1 -0
  8. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/PKG-INFO +14 -3
  9. agentica-0.1.2/agentica/version.py +0 -1
  10. {agentica-0.1.2 → agentica-0.1.3}/LICENSE +0 -0
  11. {agentica-0.1.2 → agentica-0.1.3}/agentica/__init__.py +0 -0
  12. {agentica-0.1.2 → agentica-0.1.3}/agentica/assistant.py +0 -0
  13. {agentica-0.1.2 → agentica-0.1.3}/agentica/document.py +0 -0
  14. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/__init__.py +0 -0
  15. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/azure_emb.py +0 -0
  16. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/base.py +0 -0
  17. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/hash_emb.py +0 -0
  18. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/ollama_emb.py +0 -0
  19. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/openai_emb.py +0 -0
  20. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/text2vec_emb.py +0 -0
  21. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/together_emb.py +0 -0
  22. {agentica-0.1.2 → agentica-0.1.3}/agentica/emb/word2vec_emb.py +0 -0
  23. {agentica-0.1.2 → agentica-0.1.3}/agentica/file/__init__.py +0 -0
  24. {agentica-0.1.2 → agentica-0.1.3}/agentica/knowledge/__init__.py +0 -0
  25. {agentica-0.1.2 → agentica-0.1.3}/agentica/knowledge/knowledge_base.py +0 -0
  26. {agentica-0.1.2 → agentica-0.1.3}/agentica/knowledge/langchain.py +0 -0
  27. {agentica-0.1.2 → agentica-0.1.3}/agentica/knowledge/llamaindex.py +0 -0
  28. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/__init__.py +0 -0
  29. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/anthropic_llm.py +0 -0
  30. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/azure_llm.py +0 -0
  31. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/base.py +0 -0
  32. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/deepseek_llm.py +0 -0
  33. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/moonshot_llm.py +0 -0
  34. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/ollama_llm.py +0 -0
  35. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/openai_llm.py +0 -0
  36. {agentica-0.1.2 → agentica-0.1.3}/agentica/llm/together_llm.py +0 -0
  37. {agentica-0.1.2 → agentica-0.1.3}/agentica/memory.py +0 -0
  38. {agentica-0.1.2 → agentica-0.1.3}/agentica/message.py +0 -0
  39. {agentica-0.1.2 → agentica-0.1.3}/agentica/pg_storage.py +0 -0
  40. {agentica-0.1.2 → agentica-0.1.3}/agentica/python_assistant.py +0 -0
  41. {agentica-0.1.2 → agentica-0.1.3}/agentica/references.py +0 -0
  42. {agentica-0.1.2 → agentica-0.1.3}/agentica/run_record.py +0 -0
  43. {agentica-0.1.2 → agentica-0.1.3}/agentica/sqlite_storage.py +0 -0
  44. {agentica-0.1.2 → agentica-0.1.3}/agentica/task.py +0 -0
  45. {agentica-0.1.2 → agentica-0.1.3}/agentica/tool.py +0 -0
  46. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/__init__.py +0 -0
  47. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/airflow.py +0 -0
  48. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/analyze_image.py +0 -0
  49. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/apify.py +0 -0
  50. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/arxiv.py +0 -0
  51. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/create_image.py +0 -0
  52. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/dblp.py +0 -0
  53. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/duckduckgo.py +0 -0
  54. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/file.py +0 -0
  55. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/jina.py +0 -0
  56. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/ocr.py +0 -0
  57. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/run_nb_code.py +0 -0
  58. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/run_python_code.py +0 -0
  59. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/search_exa.py +0 -0
  60. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/search_serper.py +0 -0
  61. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/shell.py +0 -0
  62. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/sql.py +0 -0
  63. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/url_crawler.py +0 -0
  64. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/wikipedia.py +0 -0
  65. {agentica-0.1.2 → agentica-0.1.3}/agentica/tools/yfinance.py +0 -0
  66. {agentica-0.1.2 → agentica-0.1.3}/agentica/utils/__init__.py +0 -0
  67. {agentica-0.1.2 → agentica-0.1.3}/agentica/utils/file_parser.py +0 -0
  68. {agentica-0.1.2 → agentica-0.1.3}/agentica/utils/log.py +0 -0
  69. {agentica-0.1.2 → agentica-0.1.3}/agentica/utils/misc.py +0 -0
  70. {agentica-0.1.2 → agentica-0.1.3}/agentica/utils/shell.py +0 -0
  71. {agentica-0.1.2 → agentica-0.1.3}/agentica/utils/timer.py +0 -0
  72. {agentica-0.1.2 → agentica-0.1.3}/agentica/vectordb/__init__.py +0 -0
  73. {agentica-0.1.2 → agentica-0.1.3}/agentica/vectordb/base.py +0 -0
  74. {agentica-0.1.2 → agentica-0.1.3}/agentica/vectordb/lancedb.py +0 -0
  75. {agentica-0.1.2 → agentica-0.1.3}/agentica/vectordb/memorydb.py +0 -0
  76. {agentica-0.1.2 → agentica-0.1.3}/agentica/vectordb/pgvector.py +0 -0
  77. {agentica-0.1.2 → agentica-0.1.3}/agentica/workflow.py +0 -0
  78. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/SOURCES.txt +0 -0
  79. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/dependency_links.txt +0 -0
  80. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/entry_points.txt +0 -0
  81. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/not-zip-safe +0 -0
  82. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/requires.txt +0 -0
  83. {agentica-0.1.2 → agentica-0.1.3}/agentica.egg-info/top_level.txt +0 -0
  84. {agentica-0.1.2 → agentica-0.1.3}/setup.cfg +0 -0
  85. {agentica-0.1.2 → agentica-0.1.3}/setup.py +0 -0
  86. {agentica-0.1.2 → agentica-0.1.3}/tests/__init__.py +0 -0
  87. {agentica-0.1.2 → agentica-0.1.3}/tests/test_create_image.py +0 -0
  88. {agentica-0.1.2 → agentica-0.1.3}/tests/test_jina_tool.py +0 -0
  89. {agentica-0.1.2 → agentica-0.1.3}/tests/test_llm.py +0 -0
  90. {agentica-0.1.2 → agentica-0.1.3}/tests/test_moonshot_llm.py +0 -0
  91. {agentica-0.1.2 → agentica-0.1.3}/tests/test_run_nb_code.py +0 -0
  92. {agentica-0.1.2 → agentica-0.1.3}/tests/test_sqlite_storage.py +0 -0
  93. {agentica-0.1.2 → agentica-0.1.3}/tests/test_url_crawler.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agentica
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: LLM agents
5
5
  Home-page: https://github.com/shibing624/agentica
6
6
  Author: XuMing
@@ -91,9 +91,19 @@ pip install .
91
91
 
92
92
  ## Getting Started
93
93
 
94
- 1. 复制[example.env](https://github.com/shibing624/agentica/blob/main/example.env)文件为`.env`,并粘贴DEEPSEEK_API_KEY(可选配OpenAI API key、Moonshoot API key等第三方LLM)。
94
+ ### 运行示例
95
95
 
96
- 2. 使用`agentica`构建Agent,拆解任务并执行:
96
+ ```shell
97
+ git clone https://github.com/shibing624/agentica.git
98
+ cd agentica
99
+ cd examples
100
+ cp ../.env.example .env
101
+ python web_search_deepseek_demo.py
102
+ ```
103
+
104
+ 1. 复制[.env.example](https://github.com/shibing624/agentica/blob/main/.env.example)文件到运行目录下`.env`,并填写LLM api key(选填DEEPSEEK_API_KEY、MOONSHOT_API_KEY、OPENAI_API_KEY等任一个即可)。
105
+
106
+ 2. 使用`agentica`构建Agent并执行:
97
107
 
98
108
  自动调用google搜索工具,示例[examples/web_search_deepseek_demo.py](https://github.com/shibing624/agentica/blob/main/examples/web_search_deepseek_demo.py)
99
109
 
@@ -151,6 +161,7 @@ The LLM OS design:
151
161
 
152
162
  ```shell
153
163
  cd examples
164
+ cp ../.env.example .env
154
165
  streamlit run llm_os_demo.py
155
166
  ```
156
167
 
@@ -61,9 +61,19 @@ pip install .
61
61
 
62
62
  ## Getting Started
63
63
 
64
- 1. 复制[example.env](https://github.com/shibing624/agentica/blob/main/example.env)文件为`.env`,并粘贴DEEPSEEK_API_KEY(可选配OpenAI API key、Moonshoot API key等第三方LLM)。
64
+ ### 运行示例
65
65
 
66
- 2. 使用`agentica`构建Agent,拆解任务并执行:
66
+ ```shell
67
+ git clone https://github.com/shibing624/agentica.git
68
+ cd agentica
69
+ cd examples
70
+ cp ../.env.example .env
71
+ python web_search_deepseek_demo.py
72
+ ```
73
+
74
+ 1. 复制[.env.example](https://github.com/shibing624/agentica/blob/main/.env.example)文件到运行目录下`.env`,并填写LLM api key(选填DEEPSEEK_API_KEY、MOONSHOT_API_KEY、OPENAI_API_KEY等任一个即可)。
75
+
76
+ 2. 使用`agentica`构建Agent并执行:
67
77
 
68
78
  自动调用google搜索工具,示例[examples/web_search_deepseek_demo.py](https://github.com/shibing624/agentica/blob/main/examples/web_search_deepseek_demo.py)
69
79
 
@@ -121,6 +131,7 @@ The LLM OS design:
121
131
 
122
132
  ```shell
123
133
  cd examples
134
+ cp ../.env.example .env
124
135
  streamlit run llm_os_demo.py
125
136
  ```
126
137
 
@@ -5,24 +5,23 @@
5
5
  """
6
6
  import os
7
7
  from datetime import datetime
8
- pwd_path = os.path.abspath(os.path.dirname(__file__))
9
8
 
10
9
  # Load environment variables from .env file
11
- env_path = os.path.realpath(os.path.join(pwd_path, "../.env"))
12
- DOTENV_PATH = os.environ.get("DOTENV_PATH", env_path)
10
+ DOTENV_PATH = os.environ.get("DOTENV_PATH", os.path.join(os.getcwd(), ".env"))
13
11
  try:
14
12
  from dotenv import load_dotenv # noqa
15
13
  from loguru import logger # noqa, need to import logger here to avoid circular import
16
14
 
17
15
  if load_dotenv(DOTENV_PATH, override=True):
18
16
  logger.info(f"Loaded environment variables from {DOTENV_PATH}")
17
+ else:
18
+ logger.debug(f"No .env file found at {DOTENV_PATH}, skipping...")
19
19
  except ImportError:
20
20
  logger.debug("dotenv not installed, skipping...")
21
21
 
22
22
  AGENTICA_HOME = os.environ.get("AGENTICA_HOME", os.path.expanduser("~/.agentica"))
23
23
  DATA_DIR = os.environ.get("DATA_DIR", f"{AGENTICA_HOME}/data")
24
- current_date = datetime.now()
25
- formatted_date = current_date.strftime("%Y%m%d")
24
+ formatted_date = datetime.now().strftime("%Y%m%d")
26
25
  LOG_FILE = os.environ.get("LOG_FILE", f"{AGENTICA_HOME}/logs/{formatted_date}.log")
27
26
  logger.debug(f"LOG_FILE: {LOG_FILE}")
28
27
  LOG_LEVEL = os.environ.get("LOG_LEVEL", "INFO")
@@ -1,4 +1,9 @@
1
- from typing import List, Optional, Any
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ @author:XuMing(xuming624@qq.com)
4
+ @description:
5
+ """
6
+ from typing import List, Optional, Any, Dict
2
7
 
3
8
  from pydantic import BaseModel
4
9
 
@@ -10,5 +15,5 @@ class File(BaseModel):
10
15
  data_path: Optional[str] = None
11
16
  type: str = "FILE"
12
17
 
13
- def get_metadata(self) -> dict[str, Any]:
18
+ def get_metadata(self) -> Dict[str, Any]:
14
19
  return self.model_dump(exclude_none=True)
@@ -1,6 +1,12 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ @author:XuMing(xuming624@qq.com)
4
+ @description:
5
+ """
6
+ from __future__ import annotations
1
7
  import csv
2
8
  from pathlib import Path
3
- from typing import Any
9
+ from typing import Any, Dict
4
10
 
5
11
  from agentica.file.base import File
6
12
  from agentica.utils.log import logger
@@ -9,7 +15,7 @@ from agentica.utils.log import logger
9
15
  class CsvFile(File):
10
16
  type: str = "CSV"
11
17
 
12
- def get_metadata(self) -> dict[str, Any]:
18
+ def get_metadata(self) -> Dict[str, Any]:
13
19
  if self.name is None:
14
20
  self.name = Path(self.data_path).name
15
21
 
@@ -1,5 +1,11 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ @author:XuMing(xuming624@qq.com)
4
+ @description:
5
+ """
6
+ from __future__ import annotations
1
7
  from pathlib import Path
2
- from typing import Any
8
+ from typing import Any, Dict
3
9
 
4
10
  from agentica.file.base import File
5
11
 
@@ -7,7 +13,7 @@ from agentica.file.base import File
7
13
  class TextFile(File):
8
14
  type: str = "TEXT"
9
15
 
10
- def get_metadata(self) -> dict[str, Any]:
16
+ def get_metadata(self) -> Dict[str, Any]:
11
17
  if self.name is None:
12
18
  self.name = Path(self.data_path).name
13
19
  return self.model_dump(exclude_none=True)
@@ -0,0 +1 @@
1
+ __version__ = "0.1.3"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: agentica
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: LLM agents
5
5
  Home-page: https://github.com/shibing624/agentica
6
6
  Author: XuMing
@@ -91,9 +91,19 @@ pip install .
91
91
 
92
92
  ## Getting Started
93
93
 
94
- 1. 复制[example.env](https://github.com/shibing624/agentica/blob/main/example.env)文件为`.env`,并粘贴DEEPSEEK_API_KEY(可选配OpenAI API key、Moonshoot API key等第三方LLM)。
94
+ ### 运行示例
95
95
 
96
- 2. 使用`agentica`构建Agent,拆解任务并执行:
96
+ ```shell
97
+ git clone https://github.com/shibing624/agentica.git
98
+ cd agentica
99
+ cd examples
100
+ cp ../.env.example .env
101
+ python web_search_deepseek_demo.py
102
+ ```
103
+
104
+ 1. 复制[.env.example](https://github.com/shibing624/agentica/blob/main/.env.example)文件到运行目录下`.env`,并填写LLM api key(选填DEEPSEEK_API_KEY、MOONSHOT_API_KEY、OPENAI_API_KEY等任一个即可)。
105
+
106
+ 2. 使用`agentica`构建Agent并执行:
97
107
 
98
108
  自动调用google搜索工具,示例[examples/web_search_deepseek_demo.py](https://github.com/shibing624/agentica/blob/main/examples/web_search_deepseek_demo.py)
99
109
 
@@ -151,6 +161,7 @@ The LLM OS design:
151
161
 
152
162
  ```shell
153
163
  cd examples
164
+ cp ../.env.example .env
154
165
  streamlit run llm_os_demo.py
155
166
  ```
156
167
 
@@ -1 +0,0 @@
1
- __version__ = "0.1.2"
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