praisonAI 2.3.1__tar.gz → 2.3.2__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.
- {praisonai-2.3.1 → praisonai-2.3.2}/PKG-INFO +51 -1
- {praisonai-2.3.1 → praisonai-2.3.2}/PraisonAI.egg-info/PKG-INFO +51 -1
- {praisonai-2.3.1 → praisonai-2.3.2}/README.md +50 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/cli.py +46 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/deploy.py +1 -1
- praisonai-2.3.2/praisonai/version.py +1 -0
- praisonai-2.3.1/praisonai/version.py +0 -1
- {praisonai-2.3.1 → praisonai-2.3.2}/PraisonAI.egg-info/SOURCES.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/PraisonAI.egg-info/dependency_links.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/PraisonAI.egg-info/entry_points.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/PraisonAI.egg-info/requires.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/PraisonAI.egg-info/top_level.txt +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/__main__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/agents_generator.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/api/call.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/auto.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/chainlit_ui.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/inbuilt_tools/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/inbuilt_tools/autogen_tools.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/inc/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/inc/config.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/inc/models.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/scheduler.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/setup/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/setup/build.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/setup/post_install.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/setup/setup_conda_env.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/setup.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/test.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/train.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/train_vision.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/agents.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/callbacks.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/chat.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/code.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/colab.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/colab_chainlit.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/components/aicoder.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/context.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/database_config.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/db.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/realtime.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/realtimeclient/__init__.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/realtimeclient/tools.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/ui/sql_alchemy.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/praisonai/upload_vision.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/pyproject.toml +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/setup.cfg +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test_agents_playbook.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test_basic.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test_custom_tools_fix.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test_double_api_fix.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test_phase2_refactor.py +0 -0
- {praisonai-2.3.1 → praisonai-2.3.2}/tests/test_runner.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
License: MIT
|
|
@@ -859,6 +859,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
|
|
|
859
859
|
- `--expand-prompt`: Expands prompts for **detailed task execution**
|
|
860
860
|
|
|
861
861
|
|
|
862
|
+
## Web Search, Web Fetch & Prompt Caching
|
|
863
|
+
|
|
864
|
+
### CLI Usage
|
|
865
|
+
|
|
866
|
+
```bash
|
|
867
|
+
# Web Search - Get real-time information
|
|
868
|
+
praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
|
|
869
|
+
|
|
870
|
+
# Web Fetch - Retrieve and analyze URL content (Anthropic only)
|
|
871
|
+
praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
|
|
872
|
+
|
|
873
|
+
# Prompt Caching - Reduce costs for repeated prompts
|
|
874
|
+
praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
### Programmatic Usage
|
|
878
|
+
|
|
879
|
+
```python
|
|
880
|
+
from praisonaiagents import Agent
|
|
881
|
+
|
|
882
|
+
# Web Search
|
|
883
|
+
agent = Agent(
|
|
884
|
+
instructions="You are a research assistant",
|
|
885
|
+
llm="openai/gpt-4o-search-preview",
|
|
886
|
+
web_search=True
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
# Web Fetch (Anthropic only)
|
|
890
|
+
agent = Agent(
|
|
891
|
+
instructions="You are a content analyzer",
|
|
892
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
893
|
+
web_fetch=True
|
|
894
|
+
)
|
|
895
|
+
|
|
896
|
+
# Prompt Caching
|
|
897
|
+
agent = Agent(
|
|
898
|
+
instructions="You are an AI assistant..." * 50, # Long system prompt
|
|
899
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
900
|
+
prompt_caching=True
|
|
901
|
+
)
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
**Supported Providers:**
|
|
905
|
+
| Feature | Providers |
|
|
906
|
+
|---------|-----------|
|
|
907
|
+
| Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
|
|
908
|
+
| Web Fetch | Anthropic |
|
|
909
|
+
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
910
|
+
|
|
911
|
+
|
|
862
912
|
## Development:
|
|
863
913
|
|
|
864
914
|
Below is used for development only.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: PraisonAI
|
|
3
|
-
Version: 2.3.
|
|
3
|
+
Version: 2.3.2
|
|
4
4
|
Summary: PraisonAI is an AI Agents Framework with Self Reflection. PraisonAI application combines PraisonAI Agents, AutoGen, and CrewAI into a low-code solution for building and managing multi-agent LLM systems, focusing on simplicity, customisation, and efficient human-agent collaboration.
|
|
5
5
|
Author: Mervin Praison
|
|
6
6
|
License: MIT
|
|
@@ -859,6 +859,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
|
|
|
859
859
|
- `--expand-prompt`: Expands prompts for **detailed task execution**
|
|
860
860
|
|
|
861
861
|
|
|
862
|
+
## Web Search, Web Fetch & Prompt Caching
|
|
863
|
+
|
|
864
|
+
### CLI Usage
|
|
865
|
+
|
|
866
|
+
```bash
|
|
867
|
+
# Web Search - Get real-time information
|
|
868
|
+
praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
|
|
869
|
+
|
|
870
|
+
# Web Fetch - Retrieve and analyze URL content (Anthropic only)
|
|
871
|
+
praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
|
|
872
|
+
|
|
873
|
+
# Prompt Caching - Reduce costs for repeated prompts
|
|
874
|
+
praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
|
|
875
|
+
```
|
|
876
|
+
|
|
877
|
+
### Programmatic Usage
|
|
878
|
+
|
|
879
|
+
```python
|
|
880
|
+
from praisonaiagents import Agent
|
|
881
|
+
|
|
882
|
+
# Web Search
|
|
883
|
+
agent = Agent(
|
|
884
|
+
instructions="You are a research assistant",
|
|
885
|
+
llm="openai/gpt-4o-search-preview",
|
|
886
|
+
web_search=True
|
|
887
|
+
)
|
|
888
|
+
|
|
889
|
+
# Web Fetch (Anthropic only)
|
|
890
|
+
agent = Agent(
|
|
891
|
+
instructions="You are a content analyzer",
|
|
892
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
893
|
+
web_fetch=True
|
|
894
|
+
)
|
|
895
|
+
|
|
896
|
+
# Prompt Caching
|
|
897
|
+
agent = Agent(
|
|
898
|
+
instructions="You are an AI assistant..." * 50, # Long system prompt
|
|
899
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
900
|
+
prompt_caching=True
|
|
901
|
+
)
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
**Supported Providers:**
|
|
905
|
+
| Feature | Providers |
|
|
906
|
+
|---------|-----------|
|
|
907
|
+
| Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
|
|
908
|
+
| Web Fetch | Anthropic |
|
|
909
|
+
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
910
|
+
|
|
911
|
+
|
|
862
912
|
## Development:
|
|
863
913
|
|
|
864
914
|
Below is used for development only.
|
|
@@ -762,6 +762,56 @@ result = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)
|
|
|
762
762
|
- `--expand-prompt`: Expands prompts for **detailed task execution**
|
|
763
763
|
|
|
764
764
|
|
|
765
|
+
## Web Search, Web Fetch & Prompt Caching
|
|
766
|
+
|
|
767
|
+
### CLI Usage
|
|
768
|
+
|
|
769
|
+
```bash
|
|
770
|
+
# Web Search - Get real-time information
|
|
771
|
+
praisonai "What are the latest AI news today?" --web-search --llm openai/gpt-4o-search-preview
|
|
772
|
+
|
|
773
|
+
# Web Fetch - Retrieve and analyze URL content (Anthropic only)
|
|
774
|
+
praisonai "Summarize https://docs.praison.ai" --web-fetch --llm anthropic/claude-sonnet-4-20250514
|
|
775
|
+
|
|
776
|
+
# Prompt Caching - Reduce costs for repeated prompts
|
|
777
|
+
praisonai "Analyze this document..." --prompt-caching --llm anthropic/claude-sonnet-4-20250514
|
|
778
|
+
```
|
|
779
|
+
|
|
780
|
+
### Programmatic Usage
|
|
781
|
+
|
|
782
|
+
```python
|
|
783
|
+
from praisonaiagents import Agent
|
|
784
|
+
|
|
785
|
+
# Web Search
|
|
786
|
+
agent = Agent(
|
|
787
|
+
instructions="You are a research assistant",
|
|
788
|
+
llm="openai/gpt-4o-search-preview",
|
|
789
|
+
web_search=True
|
|
790
|
+
)
|
|
791
|
+
|
|
792
|
+
# Web Fetch (Anthropic only)
|
|
793
|
+
agent = Agent(
|
|
794
|
+
instructions="You are a content analyzer",
|
|
795
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
796
|
+
web_fetch=True
|
|
797
|
+
)
|
|
798
|
+
|
|
799
|
+
# Prompt Caching
|
|
800
|
+
agent = Agent(
|
|
801
|
+
instructions="You are an AI assistant..." * 50, # Long system prompt
|
|
802
|
+
llm="anthropic/claude-sonnet-4-20250514",
|
|
803
|
+
prompt_caching=True
|
|
804
|
+
)
|
|
805
|
+
```
|
|
806
|
+
|
|
807
|
+
**Supported Providers:**
|
|
808
|
+
| Feature | Providers |
|
|
809
|
+
|---------|-----------|
|
|
810
|
+
| Web Search | OpenAI, Gemini, Anthropic, xAI, Perplexity |
|
|
811
|
+
| Web Fetch | Anthropic |
|
|
812
|
+
| Prompt Caching | OpenAI (auto), Anthropic, Bedrock, Deepseek |
|
|
813
|
+
|
|
814
|
+
|
|
765
815
|
## Development:
|
|
766
816
|
|
|
767
817
|
Below is used for development only.
|
|
@@ -584,6 +584,9 @@ class PraisonAI:
|
|
|
584
584
|
parser.add_argument("--tools", "-t", type=str, help="Path to tools.py file for research agent")
|
|
585
585
|
parser.add_argument("--save", "-s", action="store_true", help="Save research output to file (output/research/)")
|
|
586
586
|
parser.add_argument("--verbose", "-v", action="store_true", help="Enable verbose output for research")
|
|
587
|
+
parser.add_argument("--web-search", action="store_true", help="Enable native web search (OpenAI, Gemini, Anthropic, xAI, Perplexity)")
|
|
588
|
+
parser.add_argument("--web-fetch", action="store_true", help="Enable web fetch to retrieve URL content (Anthropic only)")
|
|
589
|
+
parser.add_argument("--prompt-caching", action="store_true", help="Enable prompt caching to reduce costs (OpenAI, Anthropic, Bedrock, Deepseek)")
|
|
587
590
|
|
|
588
591
|
# If we're in a test environment, parse with empty args to avoid pytest interference
|
|
589
592
|
if in_test_env:
|
|
@@ -933,6 +936,35 @@ class PraisonAI:
|
|
|
933
936
|
verbose = getattr(self.args, 'verbose', False)
|
|
934
937
|
return self._expand_prompt(prompt, expand_tools, verbose)
|
|
935
938
|
|
|
939
|
+
def _save_output(self, prompt: str, result: str):
|
|
940
|
+
"""
|
|
941
|
+
Save output to output/prompts/ folder.
|
|
942
|
+
|
|
943
|
+
Args:
|
|
944
|
+
prompt: The original prompt
|
|
945
|
+
result: The output result to save
|
|
946
|
+
"""
|
|
947
|
+
from datetime import datetime
|
|
948
|
+
from rich import print
|
|
949
|
+
|
|
950
|
+
# Create output directory
|
|
951
|
+
output_dir = os.path.join(os.getcwd(), "output", "prompts")
|
|
952
|
+
os.makedirs(output_dir, exist_ok=True)
|
|
953
|
+
|
|
954
|
+
# Generate filename with timestamp
|
|
955
|
+
timestamp = datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
|
956
|
+
# Create a safe filename from prompt (first 30 chars)
|
|
957
|
+
safe_prompt = "".join(c if c.isalnum() or c in " -_" else "" for c in prompt[:30]).strip().replace(" ", "_")
|
|
958
|
+
filename = f"{timestamp}_{safe_prompt}.md"
|
|
959
|
+
filepath = os.path.join(output_dir, filename)
|
|
960
|
+
|
|
961
|
+
# Write output
|
|
962
|
+
with open(filepath, "w", encoding="utf-8") as f:
|
|
963
|
+
f.write(f"# Prompt\n\n{prompt}\n\n")
|
|
964
|
+
f.write(f"# Output\n\n{result}\n")
|
|
965
|
+
|
|
966
|
+
print(f"[green]✅ Output saved to: {filepath}[/green]")
|
|
967
|
+
|
|
936
968
|
def handle_direct_prompt(self, prompt):
|
|
937
969
|
"""
|
|
938
970
|
Handle direct prompt by creating a single agent and running it.
|
|
@@ -954,8 +986,22 @@ class PraisonAI:
|
|
|
954
986
|
if hasattr(self, 'args') and self.args.llm:
|
|
955
987
|
agent_config["llm"] = self.args.llm
|
|
956
988
|
|
|
989
|
+
# Add feature flags if enabled
|
|
990
|
+
if hasattr(self, 'args'):
|
|
991
|
+
if getattr(self.args, 'web_search', False):
|
|
992
|
+
agent_config["web_search"] = True
|
|
993
|
+
if getattr(self.args, 'web_fetch', False):
|
|
994
|
+
agent_config["web_fetch"] = True
|
|
995
|
+
if getattr(self.args, 'prompt_caching', False):
|
|
996
|
+
agent_config["prompt_caching"] = True
|
|
997
|
+
|
|
957
998
|
agent = PraisonAgent(**agent_config)
|
|
958
999
|
result = agent.start(prompt)
|
|
1000
|
+
|
|
1001
|
+
# Save output if --save is enabled
|
|
1002
|
+
if hasattr(self, 'args') and getattr(self.args, 'save', False):
|
|
1003
|
+
self._save_output(prompt, result)
|
|
1004
|
+
|
|
959
1005
|
return result
|
|
960
1006
|
elif CREWAI_AVAILABLE:
|
|
961
1007
|
from crewai import Agent, Task, Crew
|
|
@@ -57,7 +57,7 @@ class CloudDeployer:
|
|
|
57
57
|
file.write("FROM python:3.11-slim\n")
|
|
58
58
|
file.write("WORKDIR /app\n")
|
|
59
59
|
file.write("COPY . .\n")
|
|
60
|
-
file.write("RUN pip install flask praisonai==2.3.
|
|
60
|
+
file.write("RUN pip install flask praisonai==2.3.2 gunicorn markdown\n")
|
|
61
61
|
file.write("EXPOSE 8080\n")
|
|
62
62
|
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
|
63
63
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "2.3.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "2.3.1"
|
|
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
|