agentica 0.1.2__tar.gz → 0.1.4__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.
- {agentica-0.1.2 → agentica-0.1.4}/PKG-INFO +19 -5
- {agentica-0.1.2 → agentica-0.1.4}/README.md +16 -2
- {agentica-0.1.2 → agentica-0.1.4}/agentica/__init__.py +1 -1
- agentica-0.1.4/agentica/config.py +32 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/file/base.py +7 -2
- {agentica-0.1.2 → agentica-0.1.4}/agentica/file/csv.py +8 -2
- {agentica-0.1.2 → agentica-0.1.4}/agentica/file/txt.py +8 -2
- {agentica-0.1.2 → agentica-0.1.4}/agentica/utils/file_parser.py +1 -1
- {agentica-0.1.2 → agentica-0.1.4}/agentica/utils/log.py +4 -4
- agentica-0.1.4/agentica/version.py +1 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/PKG-INFO +19 -5
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/requires.txt +2 -2
- {agentica-0.1.2 → agentica-0.1.4}/setup.py +2 -2
- {agentica-0.1.2 → agentica-0.1.4}/tests/test_llm.py +1 -1
- {agentica-0.1.2 → agentica-0.1.4}/tests/test_moonshot_llm.py +1 -1
- agentica-0.1.2/agentica/config.py +0 -56
- agentica-0.1.2/agentica/version.py +0 -1
- {agentica-0.1.2 → agentica-0.1.4}/LICENSE +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/assistant.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/document.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/azure_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/base.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/hash_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/ollama_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/openai_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/text2vec_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/together_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/emb/word2vec_emb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/file/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/knowledge/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/knowledge/knowledge_base.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/knowledge/langchain.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/knowledge/llamaindex.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/anthropic_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/azure_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/base.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/deepseek_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/moonshot_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/ollama_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/openai_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/llm/together_llm.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/memory.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/message.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/pg_storage.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/python_assistant.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/references.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/run_record.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/sqlite_storage.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/task.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tool.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/airflow.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/analyze_image.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/apify.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/arxiv.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/create_image.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/dblp.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/duckduckgo.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/file.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/jina.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/ocr.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/run_nb_code.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/run_python_code.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/search_exa.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/search_serper.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/shell.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/sql.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/url_crawler.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/wikipedia.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/tools/yfinance.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/utils/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/utils/misc.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/utils/shell.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/utils/timer.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/vectordb/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/vectordb/base.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/vectordb/lancedb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/vectordb/memorydb.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/vectordb/pgvector.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica/workflow.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/SOURCES.txt +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/dependency_links.txt +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/entry_points.txt +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/not-zip-safe +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/agentica.egg-info/top_level.txt +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/setup.cfg +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/tests/__init__.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/tests/test_create_image.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/tests/test_jina_tool.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/tests/test_run_nb_code.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/tests/test_sqlite_storage.py +0 -0
- {agentica-0.1.2 → agentica-0.1.4}/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.
|
3
|
+
Version: 0.1.4
|
4
4
|
Summary: LLM agents
|
5
5
|
Home-page: https://github.com/shibing624/agentica
|
6
6
|
Author: XuMing
|
@@ -19,14 +19,14 @@ Requires-Python: >=3.8.0
|
|
19
19
|
Description-Content-Type: text/markdown
|
20
20
|
License-File: LICENSE
|
21
21
|
Requires-Dist: loguru
|
22
|
-
Requires-Dist:
|
22
|
+
Requires-Dist: markdownify
|
23
23
|
Requires-Dist: openai
|
24
24
|
Requires-Dist: python-dotenv
|
25
25
|
Requires-Dist: pydantic
|
26
26
|
Requires-Dist: requests
|
27
27
|
Requires-Dist: sqlalchemy
|
28
|
-
Requires-Dist: markdownify
|
29
28
|
Requires-Dist: tqdm
|
29
|
+
Requires-Dist: rich
|
30
30
|
|
31
31
|
[**🇨🇳中文**](https://github.com/shibing624/agentica/blob/main/README.md) | [**🌐English**](https://github.com/shibing624/agentica/blob/main/README_EN.md) | [**🇯🇵日本語**](https://github.com/shibing624/agentica/blob/main/README_JP.md)
|
32
32
|
|
@@ -91,9 +91,23 @@ pip install .
|
|
91
91
|
|
92
92
|
## Getting Started
|
93
93
|
|
94
|
-
|
94
|
+
### 运行示例
|
95
|
+
|
96
|
+
```shell
|
97
|
+
git clone https://github.com/shibing624/agentica.git
|
98
|
+
cd agentica
|
99
|
+
pip install -r requirements.txt
|
100
|
+
|
101
|
+
# Copying required .env file, and fill in the LLM api key
|
102
|
+
cp .env.example ~/.agentica/.env
|
103
|
+
|
104
|
+
cd examples
|
105
|
+
python web_search_deepseek_demo.py
|
106
|
+
```
|
107
|
+
|
108
|
+
1. 复制[.env.example](https://github.com/shibing624/agentica/blob/main/.env.example)文件为`~/.agentica/.env`,并填写LLM api key(选填DEEPSEEK_API_KEY、MOONSHOT_API_KEY、OPENAI_API_KEY等任一个即可)。
|
95
109
|
|
96
|
-
2. 使用`agentica`构建Agent
|
110
|
+
2. 使用`agentica`构建Agent并执行:
|
97
111
|
|
98
112
|
自动调用google搜索工具,示例[examples/web_search_deepseek_demo.py](https://github.com/shibing624/agentica/blob/main/examples/web_search_deepseek_demo.py)
|
99
113
|
|
@@ -61,9 +61,23 @@ pip install .
|
|
61
61
|
|
62
62
|
## Getting Started
|
63
63
|
|
64
|
-
|
64
|
+
### 运行示例
|
65
65
|
|
66
|
-
|
66
|
+
```shell
|
67
|
+
git clone https://github.com/shibing624/agentica.git
|
68
|
+
cd agentica
|
69
|
+
pip install -r requirements.txt
|
70
|
+
|
71
|
+
# Copying required .env file, and fill in the LLM api key
|
72
|
+
cp .env.example ~/.agentica/.env
|
73
|
+
|
74
|
+
cd examples
|
75
|
+
python web_search_deepseek_demo.py
|
76
|
+
```
|
77
|
+
|
78
|
+
1. 复制[.env.example](https://github.com/shibing624/agentica/blob/main/.env.example)文件为`~/.agentica/.env`,并填写LLM api key(选填DEEPSEEK_API_KEY、MOONSHOT_API_KEY、OPENAI_API_KEY等任一个即可)。
|
79
|
+
|
80
|
+
2. 使用`agentica`构建Agent并执行:
|
67
81
|
|
68
82
|
自动调用google搜索工具,示例[examples/web_search_deepseek_demo.py](https://github.com/shibing624/agentica/blob/main/examples/web_search_deepseek_demo.py)
|
69
83
|
|
@@ -4,7 +4,7 @@
|
|
4
4
|
@description:
|
5
5
|
"""
|
6
6
|
from agentica.version import __version__ # noqa, isort: skip
|
7
|
-
from agentica.config import
|
7
|
+
from agentica.config import AGENTICA_DOTENV_PATH, SMART_LLM, FAST_LLM # noqa, isort: skip
|
8
8
|
# document
|
9
9
|
from agentica.document import Document
|
10
10
|
# vectordb
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# -*- coding: utf-8 -*-
|
2
|
+
"""
|
3
|
+
@author:XuMing(xuming624@qq.com)
|
4
|
+
@description:
|
5
|
+
"""
|
6
|
+
import os
|
7
|
+
from datetime import datetime
|
8
|
+
|
9
|
+
AGENTICA_HOME = os.environ.get("AGENTICA_HOME", os.path.expanduser("~/.agentica"))
|
10
|
+
|
11
|
+
# Load environment variables from .env file
|
12
|
+
AGENTICA_DOTENV_PATH = os.environ.get("AGENTICA_DOTENV_PATH", f"{AGENTICA_HOME}/.env")
|
13
|
+
try:
|
14
|
+
from dotenv import load_dotenv # noqa
|
15
|
+
from loguru import logger # noqa, need to import logger here to avoid circular import
|
16
|
+
|
17
|
+
if load_dotenv(AGENTICA_DOTENV_PATH, override=True):
|
18
|
+
logger.info(f"Loaded AGENTICA_DOTENV_PATH: {AGENTICA_DOTENV_PATH}")
|
19
|
+
except ImportError:
|
20
|
+
logger.debug("dotenv not installed, skipping...")
|
21
|
+
|
22
|
+
AGENTICA_DATA_DIR = os.environ.get("AGENTICA_DATA_DIR", f"{AGENTICA_HOME}/data")
|
23
|
+
AGENTICA_LOG_LEVEL = os.environ.get("AGENTICA_LOG_LEVEL", "INFO")
|
24
|
+
AGENTICA_LOG_FILE = os.environ.get("AGENTICA_LOG_FILE")
|
25
|
+
if AGENTICA_LOG_LEVEL.upper() == "DEBUG":
|
26
|
+
formatted_date = datetime.now().strftime("%Y%m%d")
|
27
|
+
default_log_file = f"{AGENTICA_HOME}/logs/{formatted_date}.log"
|
28
|
+
AGENTICA_LOG_FILE = os.environ.get("AGENTICA_LOG_FILE", default_log_file)
|
29
|
+
logger.debug(f"AGENTICA_LOG_LEVEL: DEBUG, AGENTICA_LOG_FILE: {AGENTICA_LOG_FILE}")
|
30
|
+
|
31
|
+
SMART_LLM = os.environ.get("SMART_LLM")
|
32
|
+
FAST_LLM = os.environ.get("FAST_LLM")
|
@@ -1,4 +1,9 @@
|
|
1
|
-
|
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) ->
|
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) ->
|
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) ->
|
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)
|
@@ -7,7 +7,7 @@ import sys
|
|
7
7
|
|
8
8
|
from loguru import logger as _logger
|
9
9
|
|
10
|
-
from agentica.config import
|
10
|
+
from agentica.config import AGENTICA_LOG_FILE, AGENTICA_LOG_LEVEL
|
11
11
|
|
12
12
|
|
13
13
|
def get_logger(log_level: str = "INFO", log_file: str = None):
|
@@ -33,7 +33,7 @@ def get_logger(log_level: str = "INFO", log_file: str = None):
|
|
33
33
|
return _logger
|
34
34
|
|
35
35
|
|
36
|
-
logger = get_logger(log_level=
|
36
|
+
logger = get_logger(log_level=AGENTICA_LOG_LEVEL, log_file=AGENTICA_LOG_FILE)
|
37
37
|
|
38
38
|
|
39
39
|
def set_log_level_to_debug():
|
@@ -45,9 +45,9 @@ def set_log_level_to_debug():
|
|
45
45
|
backtrace=True,
|
46
46
|
diagnose=True,
|
47
47
|
)
|
48
|
-
if
|
48
|
+
if AGENTICA_LOG_FILE:
|
49
49
|
logger.add(
|
50
|
-
sink=
|
50
|
+
sink=AGENTICA_LOG_FILE,
|
51
51
|
level="DEBUG",
|
52
52
|
enqueue=True,
|
53
53
|
backtrace=True,
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = "0.1.4"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: agentica
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.4
|
4
4
|
Summary: LLM agents
|
5
5
|
Home-page: https://github.com/shibing624/agentica
|
6
6
|
Author: XuMing
|
@@ -19,14 +19,14 @@ Requires-Python: >=3.8.0
|
|
19
19
|
Description-Content-Type: text/markdown
|
20
20
|
License-File: LICENSE
|
21
21
|
Requires-Dist: loguru
|
22
|
-
Requires-Dist:
|
22
|
+
Requires-Dist: markdownify
|
23
23
|
Requires-Dist: openai
|
24
24
|
Requires-Dist: python-dotenv
|
25
25
|
Requires-Dist: pydantic
|
26
26
|
Requires-Dist: requests
|
27
27
|
Requires-Dist: sqlalchemy
|
28
|
-
Requires-Dist: markdownify
|
29
28
|
Requires-Dist: tqdm
|
29
|
+
Requires-Dist: rich
|
30
30
|
|
31
31
|
[**🇨🇳中文**](https://github.com/shibing624/agentica/blob/main/README.md) | [**🌐English**](https://github.com/shibing624/agentica/blob/main/README_EN.md) | [**🇯🇵日本語**](https://github.com/shibing624/agentica/blob/main/README_JP.md)
|
32
32
|
|
@@ -91,9 +91,23 @@ pip install .
|
|
91
91
|
|
92
92
|
## Getting Started
|
93
93
|
|
94
|
-
|
94
|
+
### 运行示例
|
95
|
+
|
96
|
+
```shell
|
97
|
+
git clone https://github.com/shibing624/agentica.git
|
98
|
+
cd agentica
|
99
|
+
pip install -r requirements.txt
|
100
|
+
|
101
|
+
# Copying required .env file, and fill in the LLM api key
|
102
|
+
cp .env.example ~/.agentica/.env
|
103
|
+
|
104
|
+
cd examples
|
105
|
+
python web_search_deepseek_demo.py
|
106
|
+
```
|
107
|
+
|
108
|
+
1. 复制[.env.example](https://github.com/shibing624/agentica/blob/main/.env.example)文件为`~/.agentica/.env`,并填写LLM api key(选填DEEPSEEK_API_KEY、MOONSHOT_API_KEY、OPENAI_API_KEY等任一个即可)。
|
95
109
|
|
96
|
-
2. 使用`agentica`构建Agent
|
110
|
+
2. 使用`agentica`构建Agent并执行:
|
97
111
|
|
98
112
|
自动调用google搜索工具,示例[examples/web_search_deepseek_demo.py](https://github.com/shibing624/agentica/blob/main/examples/web_search_deepseek_demo.py)
|
99
113
|
|
@@ -39,14 +39,14 @@ setup(
|
|
39
39
|
keywords='Agentica,Agent Tool,action,agent,agentica',
|
40
40
|
install_requires=[
|
41
41
|
"loguru",
|
42
|
-
"
|
42
|
+
"markdownify",
|
43
43
|
"openai",
|
44
44
|
"python-dotenv",
|
45
45
|
"pydantic",
|
46
46
|
"requests",
|
47
47
|
"sqlalchemy",
|
48
|
-
"markdownify",
|
49
48
|
"tqdm",
|
49
|
+
"rich",
|
50
50
|
],
|
51
51
|
packages=find_packages(),
|
52
52
|
)
|
@@ -8,7 +8,7 @@ This module contains tests for the LLM class.
|
|
8
8
|
import os
|
9
9
|
from unittest.mock import MagicMock, patch
|
10
10
|
|
11
|
-
from agentica.config import
|
11
|
+
from agentica.config import AGENTICA_DOTENV_PATH # noqa
|
12
12
|
from agentica.message import Message
|
13
13
|
|
14
14
|
api_key = os.getenv("MOONSHOT_API_KEY")
|
@@ -1,56 +0,0 @@
|
|
1
|
-
# -*- coding: utf-8 -*-
|
2
|
-
"""
|
3
|
-
@author:XuMing(xuming624@qq.com)
|
4
|
-
@description:
|
5
|
-
"""
|
6
|
-
import os
|
7
|
-
from datetime import datetime
|
8
|
-
pwd_path = os.path.abspath(os.path.dirname(__file__))
|
9
|
-
|
10
|
-
# 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)
|
13
|
-
try:
|
14
|
-
from dotenv import load_dotenv # noqa
|
15
|
-
from loguru import logger # noqa, need to import logger here to avoid circular import
|
16
|
-
|
17
|
-
if load_dotenv(DOTENV_PATH, override=True):
|
18
|
-
logger.info(f"Loaded environment variables from {DOTENV_PATH}")
|
19
|
-
except ImportError:
|
20
|
-
logger.debug("dotenv not installed, skipping...")
|
21
|
-
|
22
|
-
AGENTICA_HOME = os.environ.get("AGENTICA_HOME", os.path.expanduser("~/.agentica"))
|
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")
|
26
|
-
LOG_FILE = os.environ.get("LOG_FILE", f"{AGENTICA_HOME}/logs/{formatted_date}.log")
|
27
|
-
logger.debug(f"LOG_FILE: {LOG_FILE}")
|
28
|
-
LOG_LEVEL = os.environ.get("LOG_LEVEL", "INFO")
|
29
|
-
SMART_LLM = os.environ.get("SMART_LLM")
|
30
|
-
FAST_LLM = os.environ.get("FAST_LLM")
|
31
|
-
# Code-interpreter E2B api key
|
32
|
-
E2B_API_KEY = os.environ.get("E2B_API_KEY")
|
33
|
-
|
34
|
-
# Model token limit
|
35
|
-
MODEL_TOKEN_LIMIT = {
|
36
|
-
"gpt-3.5-turbo": 4096,
|
37
|
-
"gpt-3.5-turbo-instruct": 4096,
|
38
|
-
"gpt-3.5-turbo-16k": 16384,
|
39
|
-
"gpt-3.5-turbo-1106": 16384,
|
40
|
-
"gpt-3.5-turbo-16k-0613": 16384,
|
41
|
-
"gpt-4": 8192,
|
42
|
-
"gpt-4-32k": 32768,
|
43
|
-
"gpt-4-1106-preview": 128000,
|
44
|
-
"gpt-4-0125-preview": 128000,
|
45
|
-
"gpt-4-vision-preview": 128000,
|
46
|
-
"gpt-4-turbo": 128000,
|
47
|
-
"gpt-4-turbo-preview": 128000,
|
48
|
-
"gpt-4-turbo-2024-04-09": 128000,
|
49
|
-
"gpt-4o": 128000,
|
50
|
-
"gpt-4o-2024-05-13": 128000,
|
51
|
-
"moonshot-v1-8k": 8000,
|
52
|
-
"moonshot-v1-32k": 32000,
|
53
|
-
"moonshot-v1-128k": 128000,
|
54
|
-
"deepseek-chat": 128000,
|
55
|
-
"deepseek-coder": 128000,
|
56
|
-
}
|
@@ -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
|
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
|
File without changes
|