Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9790ad44ea | ||
|
|
f23556a04a |
No files matched your search
@@ -1,6 +0,0 @@
|
||||
OPENAI_MODEL_NAME="gpt-4o"
|
||||
OPENAI_API_KEY="Enter your API key"
|
||||
OPENAI_API_BASE="https://api.openai.com/v1"
|
||||
CHAINLIT_USERNAME=admin
|
||||
CHAINLIT_USERNAME=admin
|
||||
CHAINLIT_AUTH_SECRET="chainlit create-secret to create"
|
||||
@@ -1,2 +0,0 @@
|
||||
patreon: MervinPraison
|
||||
ko_fi: MervinPraison
|
||||
@@ -1,44 +0,0 @@
|
||||
name: Delayed Publish Docker
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
schedule:
|
||||
- cron: '*/4 * * * *'
|
||||
|
||||
jobs:
|
||||
check-and-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Check last commit time
|
||||
id: check_commit
|
||||
run: |
|
||||
last_commit_time=$(git log -1 --format=%ct)
|
||||
current_time=$(date +%s)
|
||||
time_diff=$((current_time - last_commit_time))
|
||||
if [ $time_diff -ge 120 ] && [ $time_diff -lt 240 ]; then
|
||||
echo "should_run=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "should_run=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: steps.check_commit.outputs.should_run == 'true'
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Log in to the GitHub Container Registry
|
||||
if: steps.check_commit.outputs.should_run == 'true'
|
||||
run: echo ${{ secrets.GH_TOKEN }} | docker login ghcr.io -u USERNAME --password-stdin
|
||||
|
||||
- name: Build and push Docker image
|
||||
if: steps.check_commit.outputs.should_run == 'true'
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: ghcr.io/mervinpraison/praisonai:latest
|
||||
@@ -1,40 +0,0 @@
|
||||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
||||
|
||||
name: Python package
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "develop" ]
|
||||
pull_request:
|
||||
branches: [ "develop" ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
python-version: ["3.10", "3.11"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
# - name: Lint with flake8
|
||||
# run: |
|
||||
# # stop the build if there are Python syntax errors or undefined names
|
||||
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
|
||||
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
|
||||
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
|
||||
# - name: Test with pytest
|
||||
# run: |
|
||||
# pytest
|
||||
@@ -1,39 +0,0 @@
|
||||
# This workflow will upload a Python Package using Twine when a release is created
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
|
||||
|
||||
# This workflow uses actions that are not certified by GitHub.
|
||||
# They are provided by a third-party and are governed by
|
||||
# separate terms of service, privacy policy, and support
|
||||
# documentation.
|
||||
|
||||
name: Upload Python Package
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build
|
||||
- name: Build package
|
||||
run: python -m build
|
||||
- name: Publish package
|
||||
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||
@@ -1,36 +0,0 @@
|
||||
name: Run specific unittest
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: 3.11
|
||||
|
||||
- name: Install Poetry
|
||||
run: |
|
||||
curl -sSL https://install.python-poetry.org | python3 -
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
poetry install
|
||||
poetry run python -m pip install duckduckgo_search
|
||||
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_API_BASE=${{ secrets.OPENAI_API_BASE }}" >> $GITHUB_ENV
|
||||
echo "OPENAI_MODEL_NAME=${{ secrets.OPENAI_MODEL_NAME }}" >> $GITHUB_ENV
|
||||
|
||||
- name: Run specific unittest
|
||||
run: |
|
||||
poetry run python -m unittest tests.test.TestExamples
|
||||
@@ -1,50 +1,23 @@
|
||||
.vscode
|
||||
crewai
|
||||
.cache
|
||||
__pycache__
|
||||
chroma.sqlite3
|
||||
test
|
||||
dist
|
||||
.env
|
||||
assets
|
||||
.idea
|
||||
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
/.pnp
|
||||
.pnp.js
|
||||
|
||||
# testing
|
||||
/coverage
|
||||
|
||||
# production
|
||||
/build
|
||||
|
||||
# misc
|
||||
.DS_Store
|
||||
.pytest_cache
|
||||
praisonAI.egg-info
|
||||
flagged
|
||||
test.yaml
|
||||
db
|
||||
praisonai_prompt.txt
|
||||
watch.sh
|
||||
docs.sh
|
||||
other
|
||||
output
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
.chainlit
|
||||
.files
|
||||
threads.db
|
||||
threads.db-journal
|
||||
|
||||
site
|
||||
# Ignore Sphinx build directory
|
||||
docs/_build/
|
||||
docs/source/
|
||||
docs/build/
|
||||
|
||||
# Ignore Sphinx cache
|
||||
docs/_build/doctrees/
|
||||
docs/_build/doctrees/*
|
||||
docs/_build/doctrees/.doctrees
|
||||
|
||||
# Ignore Sphinx logs and local build files
|
||||
docs/_build/.buildinfo
|
||||
docs/_build/.buildinfo/*
|
||||
docs/_build/.buildinfo/.buildinfo
|
||||
|
||||
praisonai/doc
|
||||
|
||||
# agentops
|
||||
trained_agents_data.pkl
|
||||
|
||||
# crewAI
|
||||
crewAI
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
@@ -1,3 +0,0 @@
|
||||
cookbooks
|
||||
tests
|
||||
docs
|
||||
@@ -1 +0,0 @@
|
||||
#praisonai
|
||||
@@ -1,23 +0,0 @@
|
||||
# .readthedocs.yaml
|
||||
# Read the Docs configuration file
|
||||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
||||
|
||||
# Required
|
||||
version: 2
|
||||
|
||||
# Set the OS, Python version and other tools you might need
|
||||
build:
|
||||
os: ubuntu-22.04
|
||||
tools:
|
||||
python: "3.12"
|
||||
jobs:
|
||||
post_install:
|
||||
- bash docs/generate_docs.sh
|
||||
|
||||
mkdocs:
|
||||
configuration: mkdocs.yml
|
||||
fail_on_warning: true
|
||||
|
||||
python:
|
||||
install:
|
||||
- requirements: docs/requirements.txt
|
||||
@@ -1,6 +0,0 @@
|
||||
FROM python:3.11-slim
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN pip install flask praisonai==0.0.57 gunicorn markdown
|
||||
EXPOSE 8080
|
||||
CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]
|
||||
@@ -1,20 +0,0 @@
|
||||
MIT License
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
@@ -1,301 +1,70 @@
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="docs/images/praisonai-logo-large.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="docs/images/praisonai-logo-black-large.png">
|
||||
<img alt="PraisonAI Logo" src="docs/images/praisonai-logo-black-large.png">
|
||||
</picture>
|
||||
</p>
|
||||
# Getting Started with Create React App
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://static.pepy.tech/badge/PraisonAI" alt="Total Downloads"></a>
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/github/v/release/MervinPraison/PraisonAI" alt="Latest Stable Version"></a>
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
|
||||
</p>
|
||||
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
|
||||
|
||||
<div align="center">
|
||||
## Available Scripts
|
||||
|
||||
# Praison AI
|
||||
In the project directory, you can run:
|
||||
|
||||
</div>
|
||||
### `npm start`
|
||||
|
||||
Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
|
||||
Runs the app in the development mode.\
|
||||
Open [http://localhost:3000](http://localhost:3000) to view it in your browser.
|
||||
|
||||
<div align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="docs/images/architecture-dark.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="docs/images/architecture-light.png">
|
||||
<img alt="PraisonAI Architecture" src="docs/images/architecture-light.png">
|
||||
</picture>
|
||||
</div>
|
||||
The page will reload when you make changes.\
|
||||
You may also see any lint errors in the console.
|
||||
|
||||
## Different User Interfaces:
|
||||
### `npm test`
|
||||
|
||||
| Interface | Description | URL |
|
||||
|---|---|---|
|
||||
| **UI** | Multi Agents such as CrewAI or AutoGen | [https://docs.praison.ai/ui/ui](https://docs.praison.ai/ui/ui) |
|
||||
| **Chat** | Chat with 100+ LLMs, single AI Agent | [https://docs.praison.ai/ui/chat](https://docs.praison.ai/ui/chat) |
|
||||
| **Code** | Chat with entire Codebase, single AI Agent | [https://docs.praison.ai/ui/code](https://docs.praison.ai/ui/code) |
|
||||
Launches the test runner in the interactive watch mode.\
|
||||
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.
|
||||
|
||||
## Google Colab Multi Agents
|
||||
### `npm run build`
|
||||
|
||||
| | Cookbook | Open in Colab |
|
||||
| ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
||||
| Include Tools | PraisonAI Tools | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-tools-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
||||
Builds the app for production to the `build` folder.\
|
||||
It correctly bundles React in production mode and optimizes the build for the best performance.
|
||||
|
||||
## Install
|
||||
The build is minified and the filenames include the hashes.\
|
||||
Your app is ready to be deployed!
|
||||
|
||||
| PraisonAI | PraisonAI Code | PraisonAI Chat |
|
||||
| --- | --- | --- |
|
||||
| `pip install praisonai` | `pip install "praisonai[code]"` | `pip install "praisonai[chat]"` |
|
||||
See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.
|
||||
|
||||
## Key Features
|
||||
### `npm run eject`
|
||||
|
||||
- Automated AI Agents Creation
|
||||
- Use CrewAI or AutoGen Framework
|
||||
- 100+ LLM Support
|
||||
- Chat with ENTIRE Codebase
|
||||
- Interactive UIs
|
||||
- YAML-based Configuration
|
||||
- Custom Tool Integration
|
||||
**Note: this is a one-way operation. Once you `eject`, you can't go back!**
|
||||
|
||||
## TL;DR Multi Agents
|
||||
If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
praisonai --init create a movie script about dog in moon
|
||||
praisonai
|
||||
```
|
||||
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own.
|
||||
|
||||
## Table of Contents
|
||||
You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it.
|
||||
|
||||
- [Installation](#installation)
|
||||
- [Initialise](#initialise)
|
||||
- [Run](#run)
|
||||
- [Full Automatic Mode](#full-automatic-mode)
|
||||
- [User Interface](#user-interface)
|
||||
- [Praison AI Chat](#praison-ai-chat)
|
||||
- [Create Custom Tools](#create-custom-tools)
|
||||
- [Agents Playbook](#agents-playbook)
|
||||
- [Include praisonai package in your project](#include-praisonai-package-in-your-project)
|
||||
- [Commands to Install Dev Dependencies](#commands-to-install-dependencies)
|
||||
- [Other Models](#other-models)
|
||||
- [Contributing](#contributing)
|
||||
- [Star History](#star-history)
|
||||
## Learn More
|
||||
|
||||
## Installation Multi Agents
|
||||
You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
```
|
||||
To learn React, check out the [React documentation](https://reactjs.org/).
|
||||
|
||||
## Initialise
|
||||
### Code Splitting
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
```
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
|
||||
|
||||
Generate your OPENAI API KEY from here: https://platform.openai.com/api-keys
|
||||
### Analyzing the Bundle Size
|
||||
|
||||
Note: You can use other providers such as Ollama, Mistral ... etc. Details are provided at the bottom.
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
|
||||
|
||||
```bash
|
||||
praisonai --init create a movie script about dog in moon
|
||||
```
|
||||
### Making a Progressive Web App
|
||||
|
||||
This will automatically create agents.yaml file in the current directory.
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
|
||||
|
||||
### To initialise with a specific agent framework (Optional):
|
||||
### Advanced Configuration
|
||||
|
||||
```bash
|
||||
praisonai --framework autogen --init create movie script about cat in mars
|
||||
```
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
|
||||
|
||||
## Run
|
||||
### Deployment
|
||||
|
||||
```bash
|
||||
praisonai
|
||||
```
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
|
||||
|
||||
or
|
||||
### `npm run build` fails to minify
|
||||
|
||||
```bash
|
||||
python -m praisonai
|
||||
```
|
||||
|
||||
### Specify the agent framework (Optional):
|
||||
|
||||
```bash
|
||||
praisonai --framework autogen
|
||||
```
|
||||
|
||||
### Full Automatic Mode
|
||||
|
||||
```bash
|
||||
praisonai --auto create a movie script about Dog in Moon
|
||||
```
|
||||
|
||||
## User Interface
|
||||
|
||||
## PraisonAI User Interfaces:
|
||||
|
||||
| Interface | Description | URL |
|
||||
| --------- | ------------------------------------------ | --------------------------------------------------------------------- |
|
||||
| **UI** | Multi Agents such as CrewAI or AutoGen | [https://docs.praisonai.com/ui/ui](https://docs.praison.ai/ui/ui) |
|
||||
| **Chat** | Chat with 100+ LLMs, single AI Agent | [https://docs.praisonai.com/ui/chat](https://docs.praison.ai/ui/chat) |
|
||||
| **Code** | Chat with entire Codebase, single AI Agent | [https://docs.praisonai.com/ui/code](https://docs.praison.ai/ui/code) |
|
||||
|
||||
```bash
|
||||
pip install -U "praisonai[ui]"
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
chainlit create-secret
|
||||
export CHAINLIT_AUTH_SECRET=xxxxxxxx
|
||||
praisonai ui
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```
|
||||
python -m praisonai ui
|
||||
```
|
||||
|
||||
## Praison AI Chat
|
||||
|
||||
- https://docs.praison.ai/chat/
|
||||
|
||||
```bash
|
||||
pip install "praisonai[chat]"
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
praisonai chat
|
||||
```
|
||||
|
||||
## Praison AI Code
|
||||
|
||||
```bash
|
||||
pip install "praisonai[code]"
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
praisonai code
|
||||
```
|
||||
|
||||
## Create Custom Tools
|
||||
|
||||
- https://docs.praison.ai/tools/custom/
|
||||
|
||||
## Agents Playbook
|
||||
|
||||
### Simple Playbook Example
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: Artificial Intelligence
|
||||
roles:
|
||||
screenwriter:
|
||||
backstory: "Skilled in crafting scripts with engaging dialogue about {topic}."
|
||||
goal: Create scripts from concepts.
|
||||
role: Screenwriter
|
||||
tasks:
|
||||
scriptwriting_task:
|
||||
description: "Develop scripts with compelling characters and dialogue about {topic}."
|
||||
expected_output: "Complete script ready for production."
|
||||
```
|
||||
|
||||
## Use 100+ Models
|
||||
|
||||
- https://docs.praison.ai/models/
|
||||
|
||||
## Include praisonai package in your project
|
||||
|
||||
- https://docs.praison.ai/developers/wrapper
|
||||
- https://docs.praison.ai/developers/wrapper-tools/
|
||||
|
||||
## Option 1: Using RAW YAML
|
||||
|
||||
```python
|
||||
from praisonai import PraisonAI
|
||||
|
||||
# Example agent_yaml content
|
||||
agent_yaml = """
|
||||
framework: "crewai"
|
||||
topic: "Space Exploration"
|
||||
|
||||
roles:
|
||||
astronomer:
|
||||
role: "Space Researcher"
|
||||
goal: "Discover new insights about {topic}"
|
||||
backstory: "You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos."
|
||||
tasks:
|
||||
investigate_exoplanets:
|
||||
description: "Research and compile information about exoplanets discovered in the last decade."
|
||||
expected_output: "A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth."
|
||||
"""
|
||||
|
||||
# Create a PraisonAI instance with the agent_yaml content
|
||||
praisonai = PraisonAI(agent_yaml=agent_yaml)
|
||||
|
||||
# Run PraisonAI
|
||||
result = praisonai.run()
|
||||
|
||||
# Print the result
|
||||
print(result)
|
||||
```
|
||||
|
||||
## Option 2: Using separate agents.yaml file
|
||||
|
||||
Note: Please create agents.yaml file before hand.
|
||||
|
||||
```python
|
||||
from praisonai import PraisonAI
|
||||
|
||||
def basic(): # Basic Mode
|
||||
praisonai = PraisonAI(agent_file="agents.yaml")
|
||||
praisonai.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
basic()
|
||||
```
|
||||
|
||||
## Commands to Install Dependencies:
|
||||
|
||||
1. **Install all dependencies, including dev dependencies:**
|
||||
|
||||
```sh
|
||||
poetry install
|
||||
```
|
||||
|
||||
2. **Install only documentation dependencies:**
|
||||
|
||||
```sh
|
||||
poetry install --with docs
|
||||
```
|
||||
|
||||
3. **Install only test dependencies:**
|
||||
|
||||
```sh
|
||||
poetry install --with test
|
||||
```
|
||||
|
||||
4. **Install only dev dependencies:**
|
||||
```sh
|
||||
poetry install --with dev
|
||||
```
|
||||
|
||||
This configuration ensures that your development dependencies are correctly categorized and installed as needed.
|
||||
|
||||
## Contributing
|
||||
|
||||
- Fork on GitHub: Use the "Fork" button on the repository page.
|
||||
- Clone your fork: `git clone https://github.com/yourusername/praisonAI.git`
|
||||
- Create a branch: `git checkout -b new-feature`
|
||||
- Make changes and commit: `git commit -am "Add some feature"`
|
||||
- Push to your fork: `git push origin new-feature`
|
||||
- Submit a pull request via GitHub's web interface.
|
||||
- Await feedback from project maintainers.
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://docs.praison.ai)
|
||||
|
||||
## License
|
||||
|
||||
Praison AI is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.
|
||||
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)
|
||||
@@ -1,67 +0,0 @@
|
||||
framework: crewai
|
||||
topic: research about the causes of lung disease
|
||||
roles:
|
||||
research_analyst:
|
||||
backstory: Experienced in analyzing scientific data related to respiratory health.
|
||||
goal: Analyze data on lung diseases
|
||||
role: Research Analyst
|
||||
llm:
|
||||
model: "groq/llama3-70b-8192"
|
||||
function_calling_llm:
|
||||
model: "google/gemini-1.5-flash-001"
|
||||
allow_delegation: False
|
||||
max_execution_time:
|
||||
max_iter:
|
||||
max_rpm:
|
||||
verbose: True
|
||||
cache: True
|
||||
system_template:
|
||||
prompt_template:
|
||||
response_template:
|
||||
tasks:
|
||||
data_analysis:
|
||||
description: Gather and analyze data on the causes and risk factors of lung
|
||||
diseases.
|
||||
expected_output: Report detailing key findings on lung disease causes.
|
||||
config:
|
||||
max_iter: 5
|
||||
output_file: "output/data_analysis.txt"
|
||||
tools:
|
||||
- 'InternetSearchTool'
|
||||
medical_writer:
|
||||
backstory: Skilled in translating complex medical information into accessible
|
||||
content.
|
||||
goal: Compile comprehensive content on lung disease causes
|
||||
role: Medical Writer
|
||||
llm:
|
||||
model: "anthropic/claude-3-haiku-20240307"
|
||||
function_calling_llm:
|
||||
model: "openai/gpt-4o"
|
||||
tasks:
|
||||
content_creation:
|
||||
description: Create detailed content summarizing the research findings on
|
||||
lung disease causes.
|
||||
expected_output: Document outlining various causes and risk factors of lung
|
||||
diseases.
|
||||
async_execution: True
|
||||
output_file: "output/medical_writer.txt"
|
||||
create_directory:
|
||||
context:
|
||||
- data_analysis
|
||||
tools:
|
||||
- ''
|
||||
editor:
|
||||
backstory: Proficient in editing medical content for accuracy and clarity.
|
||||
goal: Review and refine content on lung disease causes
|
||||
role: Editor
|
||||
llm:
|
||||
model: "cohere/command-r"
|
||||
tasks:
|
||||
content_review:
|
||||
description: Edit and refine the compiled content on lung disease causes for
|
||||
accuracy and coherence.
|
||||
expected_output: Finalized document on lung disease causes ready for dissemination.
|
||||
output_file: "output/editor.txt"
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,40 +0,0 @@
|
||||
framework: autogen
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in research, with a focus on gathering accurate and relevant
|
||||
information.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
tasks:
|
||||
research_task:
|
||||
description: Research about Mars, its environment, and the feasibility of
|
||||
a cat being on Mars. Also, research about cat behavior and characteristics.
|
||||
expected_output: Document with research findings on Mars and cats.
|
||||
tools:
|
||||
- ''
|
||||
narrative_designer:
|
||||
backstory: Skilled in narrative development, with a focus on creating engaging
|
||||
stories.
|
||||
goal: Create a story concept for a movie about a cat in Mars
|
||||
role: Narrative Designer
|
||||
tasks:
|
||||
story_concept_development:
|
||||
description: Use the research findings to craft a unique story concept for
|
||||
a movie about a cat in Mars.
|
||||
expected_output: Document with narrative arcs, character bios, and settings.
|
||||
tools:
|
||||
- ''
|
||||
scriptwriter:
|
||||
backstory: Expert in dialogue and script structure, translating concepts into
|
||||
scripts.
|
||||
goal: Write a movie script about a cat in Mars
|
||||
role: Scriptwriter
|
||||
tasks:
|
||||
scriptwriting_task:
|
||||
description: Turn the story concept into a production-ready movie script,
|
||||
including dialogue and scene details.
|
||||
expected_output: Final movie script with dialogue and scene details.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,18 +0,0 @@
|
||||
from flask import Flask
|
||||
from praisonai import PraisonAI
|
||||
import markdown
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
def basic():
|
||||
praisonai = PraisonAI(agent_file="agents.yaml")
|
||||
return praisonai.run()
|
||||
|
||||
@app.route('/')
|
||||
def home():
|
||||
output = basic()
|
||||
html_output = markdown.markdown(output)
|
||||
return f'<html><body>{html_output}</body></html>'
|
||||
|
||||
if __name__ == "__main__":
|
||||
app.run(debug=True)
|
||||
@@ -1 +0,0 @@
|
||||
# Welcome to Praison AI! 🚀🤖
|
||||
@@ -1,42 +0,0 @@
|
||||
framework: crewai
|
||||
topic: create a movie about cat in mars based on https://blog.celtx.com/how-to-write-a-good-story/
|
||||
roles:
|
||||
story_developer:
|
||||
backstory: Experienced in crafting compelling narratives for a diverse audience.
|
||||
goal: Develop an engaging storyline for a movie about cats in Mars
|
||||
role: Story Developer
|
||||
tasks:
|
||||
storyline_creation:
|
||||
description: Create a captivating storyline for a movie about cats in Mars
|
||||
inspired by the blog post at https://blog.celtx.com/how-to-write-a-good-story/
|
||||
expected_output: Detailed storyline with key plot points, character motivations,
|
||||
and setting descriptions.
|
||||
tools:
|
||||
- 'ScrapeWebsiteTool'
|
||||
screenwriter:
|
||||
backstory: Proficient in translating complex narratives into engaging screenplay
|
||||
format.
|
||||
goal: Transform the storyline into a script
|
||||
role: Screenwriter
|
||||
tasks:
|
||||
script_creation:
|
||||
description: Transform the developed storyline into a script for the movie
|
||||
about cats in Mars.
|
||||
expected_output: Complete script with dialogues, scenes, and stage directions
|
||||
ready for production.
|
||||
tools:
|
||||
- ''
|
||||
director:
|
||||
backstory: Experienced in visual storytelling and bringing scripts to life on
|
||||
screen.
|
||||
goal: Oversee the production of the movie
|
||||
role: Director
|
||||
tasks:
|
||||
movie_production:
|
||||
description: Take the script and lead the team to produce the movie 'Cats
|
||||
in Mars' based on the provided content and script.
|
||||
expected_output: Completed movie ready for distribution with compelling visuals
|
||||
and engaging storytelling.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,42 +0,0 @@
|
||||
framework: crewai
|
||||
topic: create a movie about cat in mars based on https://www.grammarly.com/blog/how-to-write-a-story/
|
||||
roles:
|
||||
story_developer:
|
||||
backstory: Experienced in crafting compelling narratives for a diverse audience.
|
||||
goal: Develop an engaging storyline for a movie about cats in Mars
|
||||
role: Story Developer
|
||||
tasks:
|
||||
storyline_creation:
|
||||
description: Create a captivating storyline for a movie about cats in Mars
|
||||
inspired by the blog post at https://www.grammarly.com/blog/how-to-write-a-story/
|
||||
expected_output: Detailed storyline with key plot points, character motivations,
|
||||
and setting descriptions.
|
||||
tools:
|
||||
- 'ScrapeWebsiteTool'
|
||||
screenwriter:
|
||||
backstory: Proficient in translating complex narratives into engaging screenplay
|
||||
format.
|
||||
goal: Transform the storyline into a script
|
||||
role: Screenwriter
|
||||
tasks:
|
||||
script_creation:
|
||||
description: Transform the developed storyline into a script for the movie
|
||||
about cats in Mars.
|
||||
expected_output: Complete script with dialogues, scenes, and stage directions
|
||||
ready for production.
|
||||
tools:
|
||||
- ''
|
||||
director:
|
||||
backstory: Experienced in visual storytelling and bringing scripts to life on
|
||||
screen.
|
||||
goal: Oversee the production of the movie
|
||||
role: Director
|
||||
tasks:
|
||||
movie_production:
|
||||
description: Take the script and lead the team to produce the movie 'Cats
|
||||
in Mars' based on the provided content and script.
|
||||
expected_output: Completed movie ready for distribution with compelling visuals
|
||||
and engaging storytelling.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,41 +0,0 @@
|
||||
framework: "crewai"
|
||||
topic: "Artificial Intelligence"
|
||||
|
||||
roles:
|
||||
researcher:
|
||||
role: "Senior Data Researcher"
|
||||
goal: "Uncover cutting-edge developments in {topic}"
|
||||
backstory: >
|
||||
You're a seasoned researcher with a knack for uncovering the latest
|
||||
developments in {topic}. Known for your ability to find the most relevant
|
||||
information and present it in a clear and concise manner.
|
||||
tools:
|
||||
- search_tool:
|
||||
engine: google
|
||||
tasks:
|
||||
research_task:
|
||||
description: >
|
||||
Conduct thorough research about {topic}, focusing on the latest
|
||||
trends and technologies.
|
||||
expected_output: >
|
||||
A list of 10 bullet points summarizing key findings with links to
|
||||
relevant sources.
|
||||
|
||||
reporting_analyst:
|
||||
role: "Reporting Analyst"
|
||||
goal: "Create detailed reports based on {topic} data analysis and research findings."
|
||||
backstory: >
|
||||
You're a meticulous analyst with a keen eye for detail. You're known for
|
||||
your ability to turn complex data into clear and concise reports, making
|
||||
it easy for others to understand and act on the information you provide.
|
||||
tasks:
|
||||
reporting_task:
|
||||
description: >
|
||||
Review the research findings and create a comprehensive report on
|
||||
{topic}. Include insights, potential opportunities, and recommendations.
|
||||
expected_output: >
|
||||
A well-structured report in Markdown format, ready for distribution.
|
||||
|
||||
dependencies:
|
||||
- task: reporting_task
|
||||
depends_on: research_task
|
||||
@@ -1,41 +0,0 @@
|
||||
framework: "autogen"
|
||||
topic: "Artificial Intelligence"
|
||||
|
||||
roles:
|
||||
narrative_designer:
|
||||
role: "Narrative Designer"
|
||||
goal: "Craft engaging storylines and narratives for {topic}"
|
||||
backstory: >
|
||||
You're a creative visionary skilled in weaving complex narratives and
|
||||
developing engaging story worlds within {topic}. Your expertise lies in
|
||||
conceptualizing the overarching story and ensuring it resonates with the audience.
|
||||
tasks:
|
||||
story_concept_development:
|
||||
description: >
|
||||
Develop a compelling story concept for {topic}, focusing on originality,
|
||||
thematic depth, and audience engagement. Outline the main narrative arcs,
|
||||
characters, and settings.
|
||||
expected_output: >
|
||||
A comprehensive document outlining the story concept, including key narrative
|
||||
arcs, character bios, and settings descriptions.
|
||||
|
||||
scriptwriter:
|
||||
role: "Scriptwriter"
|
||||
goal: "Transform story concepts into detailed scripts for {topic}"
|
||||
backstory: >
|
||||
With a flair for dialogue and a deep understanding of pacing and structure,
|
||||
you excel at bringing narratives to life through scriptwriting. Your work
|
||||
turns story concepts into blueprints for compelling {topic} experiences.
|
||||
tasks:
|
||||
scriptwriting_task:
|
||||
description: >
|
||||
Based on the narrative concept, write a detailed script for {topic}.
|
||||
Include dialogue, stage directions, and scene descriptions that bring
|
||||
the story to life.
|
||||
expected_output: >
|
||||
A detailed script ready for production, including dialogue, stage
|
||||
directions, and scene descriptions.
|
||||
|
||||
dependencies:
|
||||
- task: scriptwriting_task
|
||||
depends_on: story_concept_development
|
||||
@@ -1,43 +0,0 @@
|
||||
framework: crewai
|
||||
topic: research about nvidia growth
|
||||
roles:
|
||||
data_collector:
|
||||
backstory: An experienced researcher with the ability to efficiently collect and
|
||||
organize vast amounts of data.
|
||||
goal: Gather information on Nvidia's growth
|
||||
role: Data Collector
|
||||
tasks:
|
||||
data_collection_task:
|
||||
description: Collect data on Nvidia's growth from various sources such as
|
||||
financial reports, news articles, and company announcements.
|
||||
expected_output: A comprehensive document detailing data points on Nvidia's
|
||||
growth over the years.
|
||||
tools:
|
||||
- 'YouSearchTool'
|
||||
data_analyst:
|
||||
backstory: Specializes in extracting insights from large datasets, proficient
|
||||
in quantitative and qualitative analysis.
|
||||
goal: Analyze the collected data to identify trends and patterns
|
||||
role: Data Analyst
|
||||
tasks:
|
||||
data_analysis_task:
|
||||
description: Analyze the collected data to identify key trends and patterns
|
||||
in Nvidia's growth.
|
||||
expected_output: An analytical report summarizing trends, patterns, and key
|
||||
growth metrics of Nvidia.
|
||||
tools:
|
||||
- ''
|
||||
report_preparer:
|
||||
backstory: Experienced in creating detailed reports and presentations, turning
|
||||
analytical data into actionable insights.
|
||||
goal: Generate a final report on Nvidia's growth
|
||||
role: Report Preparer
|
||||
tasks:
|
||||
report_preparation_task:
|
||||
description: Create a detailed report based on the analysis, highlighting
|
||||
Nvidia's growth trajectory.
|
||||
expected_output: A polished, comprehensive report summarizing Nvidia's growth
|
||||
with visual aids and key insights.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,26 +0,0 @@
|
||||
framework: crewai
|
||||
topic: research about the latest AI News and prepare a detailed report
|
||||
roles:
|
||||
research_analyst:
|
||||
backstory: Experienced in gathering and analyzing data related to AI news trends.
|
||||
goal: Analyze AI News trends
|
||||
role: Research Analyst
|
||||
tasks:
|
||||
gather_data:
|
||||
description: Conduct in-depth research on the latest AI News trends from reputable
|
||||
sources.
|
||||
expected_output: Comprehensive report on current AI News trends.
|
||||
tools:
|
||||
- 'InternetSearchTool'
|
||||
content_creator:
|
||||
backstory: Skilled in writing informative and engaging content about AI News.
|
||||
goal: Create detailed reports on AI News
|
||||
role: Content Creator
|
||||
tasks:
|
||||
compile_report:
|
||||
description: Compile all gathered data into a detailed report with analysis
|
||||
and insights.
|
||||
expected_output: Well-structured report on the latest AI News with key insights.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,39 +0,0 @@
|
||||
framework: crewai
|
||||
topic: research about the causes of lung disease
|
||||
roles:
|
||||
research_analyst:
|
||||
backstory: Experienced in analyzing scientific data related to respiratory health.
|
||||
goal: Analyze data on lung diseases
|
||||
role: Research Analyst
|
||||
tasks:
|
||||
data_analysis:
|
||||
description: Gather and analyze data on the causes and risk factors of lung
|
||||
diseases.
|
||||
expected_output: Report detailing key findings on lung disease causes.
|
||||
tools:
|
||||
- 'PubmedQueryRun'
|
||||
medical_writer:
|
||||
backstory: Skilled in translating complex medical information into accessible
|
||||
content.
|
||||
goal: Compile comprehensive content on lung disease causes
|
||||
role: Medical Writer
|
||||
tasks:
|
||||
content_creation:
|
||||
description: Create detailed content summarizing the research findings on
|
||||
lung disease causes.
|
||||
expected_output: Document outlining various causes and risk factors of lung
|
||||
diseases.
|
||||
tools:
|
||||
- ''
|
||||
editor:
|
||||
backstory: Proficient in editing medical content for accuracy and clarity.
|
||||
goal: Review and refine content on lung disease causes
|
||||
role: Editor
|
||||
tasks:
|
||||
content_review:
|
||||
description: Edit and refine the compiled content on lung disease causes for
|
||||
accuracy and coherence.
|
||||
expected_output: Finalized document on lung disease causes ready for dissemination.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
@@ -1,257 +0,0 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"metadata": {
|
||||
"id": "cW47IVIvdyii"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install -Uq praisonai"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
},
|
||||
"id": "myh-_QCuHfOs",
|
||||
"outputId": "8e35d04d-261c-4379-ef8c-bbe7e6dca89f"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[1m\u001b[95m [2024-07-03 04:39:09][DEBUG]: == Working Agent: Space Researcher\u001b[00m\n",
|
||||
"\u001b[1m\u001b[95m [2024-07-03 04:39:09][INFO]: == Starting Task: Research and compile information about exoplanets discovered in the last decade.\u001b[00m\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new CrewAgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mI now can give a great answer.\n",
|
||||
"\n",
|
||||
"Final Answer: \n",
|
||||
"\n",
|
||||
"In the last decade, the field of exoplanet research has experienced a remarkable surge in discoveries, thanks to advancements in technology and dedicated space missions such as Kepler, TESS (Transiting Exoplanet Survey Satellite), and various ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, highlighting their size, potential habitability, and distance from Earth:\n",
|
||||
"\n",
|
||||
"1. **Kepler-452b**\n",
|
||||
" - **Size:** Approximately 60% larger in diameter than Earth.\n",
|
||||
" - **Potential Habitability:** Often referred to as \"Earth's Cousin,\" Kepler-452b orbits within the habitable zone of its star, where liquid water could exist. The planet receives a similar amount of energy from its star as Earth does from the Sun.\n",
|
||||
" - **Distance from Earth:** About 1,402 light-years.\n",
|
||||
"\n",
|
||||
"2. **Proxima Centauri b**\n",
|
||||
" - **Size:** Slightly larger than Earth, with a minimum mass of 1.17 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located in the habitable zone of Proxima Centauri, the closest known star to the Sun. Potential for liquid water exists, but its habitability is uncertain due to stellar flare activity.\n",
|
||||
" - **Distance from Earth:** 4.24 light-years.\n",
|
||||
"\n",
|
||||
"3. **TRAPPIST-1 System**\n",
|
||||
" - **Size:** The system contains seven Earth-sized planets. TRAPPIST-1e, f, and g are within the star's habitable zone.\n",
|
||||
" - **Potential Habitability:** TRAPPIST-1e is considered the most promising candidate for habitability, as it has a rocky composition and is located in the middle of the habitable zone.\n",
|
||||
" - **Distance from Earth:** About 39 light-years.\n",
|
||||
"\n",
|
||||
"4. **LHS 1140 b**\n",
|
||||
" - **Size:** About 1.4 times the size of Earth with a mass of around 6.6 Earth masses.\n",
|
||||
" - **Potential Habitability:** Resides in the habitable zone of its red dwarf star. The planet is likely rocky and has an atmosphere that could support life.\n",
|
||||
" - **Distance from Earth:** Approximately 40 light-years.\n",
|
||||
"\n",
|
||||
"5. **K2-18b**\n",
|
||||
" - **Size:** About 2.6 times the size of Earth with a mass of 8.6 Earth masses.\n",
|
||||
" - **Potential Habitability:** This exoplanet lies within the habitable zone and has been detected to have water vapor in its atmosphere. It is considered one of the most promising candidates for habitability outside our solar system.\n",
|
||||
" - **Distance from Earth:** Roughly 124 light-years.\n",
|
||||
"\n",
|
||||
"6. **Gliese 667 Cc**\n",
|
||||
" - **Size:** At least 4.5 times the mass of Earth.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of its host star, Gliese 667 C. Its orbit allows for the possibility of liquid water on its surface.\n",
|
||||
" - **Distance from Earth:** About 23.62 light-years.\n",
|
||||
"\n",
|
||||
"7. **HD 40307 g**\n",
|
||||
" - **Size:** A super-Earth with at least 7 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located in the habitable zone of its star, this planet could potentially support liquid water and therefore life.\n",
|
||||
" - **Distance from Earth:** Approximately 42 light-years.\n",
|
||||
"\n",
|
||||
"8. **Ross 128 b**\n",
|
||||
" - **Size:** Similar to Earth, with a minimum mass of 1.35 Earth masses.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of the relatively quiet red dwarf star Ross 128. The planet has mild temperatures that could allow for liquid water.\n",
|
||||
" - **Distance from Earth:** About 11 light-years.\n",
|
||||
"\n",
|
||||
"9. **Teegarden's Star b**\n",
|
||||
" - **Size:** Comparable to Earth.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of Teegarden's Star, a cool red dwarf. Conditions could be suitable for liquid water.\n",
|
||||
" - **Distance from Earth:** Approximately 12 light-years.\n",
|
||||
"\n",
|
||||
"10. **Barnard's Star b**\n",
|
||||
" - **Size:** A super-Earth with a mass of about 3.2 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located just outside the traditional habitable zone, but still within a range where liquid water could exist under certain conditions.\n",
|
||||
" - **Distance from Earth:** About 6 light-years.\n",
|
||||
"\n",
|
||||
"These discoveries highlight the diverse and intriguing nature of exoplanets found in the last decade. Each of these planets adds valuable information to our understanding of planetary formation, potential habitability, and the search for extraterrestrial life. Continued advancements in detection methods and technologies promise to further expand our knowledge in the years to come.\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\u001b[1m\u001b[92m [2024-07-03 04:39:25][DEBUG]: == [Space Researcher] Task output: In the last decade, the field of exoplanet research has experienced a remarkable surge in discoveries, thanks to advancements in technology and dedicated space missions such as Kepler, TESS (Transiting Exoplanet Survey Satellite), and various ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, highlighting their size, potential habitability, and distance from Earth:\n",
|
||||
"\n",
|
||||
"1. **Kepler-452b**\n",
|
||||
" - **Size:** Approximately 60% larger in diameter than Earth.\n",
|
||||
" - **Potential Habitability:** Often referred to as \"Earth's Cousin,\" Kepler-452b orbits within the habitable zone of its star, where liquid water could exist. The planet receives a similar amount of energy from its star as Earth does from the Sun.\n",
|
||||
" - **Distance from Earth:** About 1,402 light-years.\n",
|
||||
"\n",
|
||||
"2. **Proxima Centauri b**\n",
|
||||
" - **Size:** Slightly larger than Earth, with a minimum mass of 1.17 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located in the habitable zone of Proxima Centauri, the closest known star to the Sun. Potential for liquid water exists, but its habitability is uncertain due to stellar flare activity.\n",
|
||||
" - **Distance from Earth:** 4.24 light-years.\n",
|
||||
"\n",
|
||||
"3. **TRAPPIST-1 System**\n",
|
||||
" - **Size:** The system contains seven Earth-sized planets. TRAPPIST-1e, f, and g are within the star's habitable zone.\n",
|
||||
" - **Potential Habitability:** TRAPPIST-1e is considered the most promising candidate for habitability, as it has a rocky composition and is located in the middle of the habitable zone.\n",
|
||||
" - **Distance from Earth:** About 39 light-years.\n",
|
||||
"\n",
|
||||
"4. **LHS 1140 b**\n",
|
||||
" - **Size:** About 1.4 times the size of Earth with a mass of around 6.6 Earth masses.\n",
|
||||
" - **Potential Habitability:** Resides in the habitable zone of its red dwarf star. The planet is likely rocky and has an atmosphere that could support life.\n",
|
||||
" - **Distance from Earth:** Approximately 40 light-years.\n",
|
||||
"\n",
|
||||
"5. **K2-18b**\n",
|
||||
" - **Size:** About 2.6 times the size of Earth with a mass of 8.6 Earth masses.\n",
|
||||
" - **Potential Habitability:** This exoplanet lies within the habitable zone and has been detected to have water vapor in its atmosphere. It is considered one of the most promising candidates for habitability outside our solar system.\n",
|
||||
" - **Distance from Earth:** Roughly 124 light-years.\n",
|
||||
"\n",
|
||||
"6. **Gliese 667 Cc**\n",
|
||||
" - **Size:** At least 4.5 times the mass of Earth.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of its host star, Gliese 667 C. Its orbit allows for the possibility of liquid water on its surface.\n",
|
||||
" - **Distance from Earth:** About 23.62 light-years.\n",
|
||||
"\n",
|
||||
"7. **HD 40307 g**\n",
|
||||
" - **Size:** A super-Earth with at least 7 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located in the habitable zone of its star, this planet could potentially support liquid water and therefore life.\n",
|
||||
" - **Distance from Earth:** Approximately 42 light-years.\n",
|
||||
"\n",
|
||||
"8. **Ross 128 b**\n",
|
||||
" - **Size:** Similar to Earth, with a minimum mass of 1.35 Earth masses.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of the relatively quiet red dwarf star Ross 128. The planet has mild temperatures that could allow for liquid water.\n",
|
||||
" - **Distance from Earth:** About 11 light-years.\n",
|
||||
"\n",
|
||||
"9. **Teegarden's Star b**\n",
|
||||
" - **Size:** Comparable to Earth.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of Teegarden's Star, a cool red dwarf. Conditions could be suitable for liquid water.\n",
|
||||
" - **Distance from Earth:** Approximately 12 light-years.\n",
|
||||
"\n",
|
||||
"10. **Barnard's Star b**\n",
|
||||
" - **Size:** A super-Earth with a mass of about 3.2 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located just outside the traditional habitable zone, but still within a range where liquid water could exist under certain conditions.\n",
|
||||
" - **Distance from Earth:** About 6 light-years.\n",
|
||||
"\n",
|
||||
"These discoveries highlight the diverse and intriguing nature of exoplanets found in the last decade. Each of these planets adds valuable information to our understanding of planetary formation, potential habitability, and the search for extraterrestrial life. Continued advancements in detection methods and technologies promise to further expand our knowledge in the years to come.\n",
|
||||
"\n",
|
||||
"\u001b[00m\n",
|
||||
"### Task Output ###\n",
|
||||
"In the last decade, the field of exoplanet research has experienced a remarkable surge in discoveries, thanks to advancements in technology and dedicated space missions such as Kepler, TESS (Transiting Exoplanet Survey Satellite), and various ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, highlighting their size, potential habitability, and distance from Earth:\n",
|
||||
"\n",
|
||||
"1. **Kepler-452b**\n",
|
||||
" - **Size:** Approximately 60% larger in diameter than Earth.\n",
|
||||
" - **Potential Habitability:** Often referred to as \"Earth's Cousin,\" Kepler-452b orbits within the habitable zone of its star, where liquid water could exist. The planet receives a similar amount of energy from its star as Earth does from the Sun.\n",
|
||||
" - **Distance from Earth:** About 1,402 light-years.\n",
|
||||
"\n",
|
||||
"2. **Proxima Centauri b**\n",
|
||||
" - **Size:** Slightly larger than Earth, with a minimum mass of 1.17 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located in the habitable zone of Proxima Centauri, the closest known star to the Sun. Potential for liquid water exists, but its habitability is uncertain due to stellar flare activity.\n",
|
||||
" - **Distance from Earth:** 4.24 light-years.\n",
|
||||
"\n",
|
||||
"3. **TRAPPIST-1 System**\n",
|
||||
" - **Size:** The system contains seven Earth-sized planets. TRAPPIST-1e, f, and g are within the star's habitable zone.\n",
|
||||
" - **Potential Habitability:** TRAPPIST-1e is considered the most promising candidate for habitability, as it has a rocky composition and is located in the middle of the habitable zone.\n",
|
||||
" - **Distance from Earth:** About 39 light-years.\n",
|
||||
"\n",
|
||||
"4. **LHS 1140 b**\n",
|
||||
" - **Size:** About 1.4 times the size of Earth with a mass of around 6.6 Earth masses.\n",
|
||||
" - **Potential Habitability:** Resides in the habitable zone of its red dwarf star. The planet is likely rocky and has an atmosphere that could support life.\n",
|
||||
" - **Distance from Earth:** Approximately 40 light-years.\n",
|
||||
"\n",
|
||||
"5. **K2-18b**\n",
|
||||
" - **Size:** About 2.6 times the size of Earth with a mass of 8.6 Earth masses.\n",
|
||||
" - **Potential Habitability:** This exoplanet lies within the habitable zone and has been detected to have water vapor in its atmosphere. It is considered one of the most promising candidates for habitability outside our solar system.\n",
|
||||
" - **Distance from Earth:** Roughly 124 light-years.\n",
|
||||
"\n",
|
||||
"6. **Gliese 667 Cc**\n",
|
||||
" - **Size:** At least 4.5 times the mass of Earth.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of its host star, Gliese 667 C. Its orbit allows for the possibility of liquid water on its surface.\n",
|
||||
" - **Distance from Earth:** About 23.62 light-years.\n",
|
||||
"\n",
|
||||
"7. **HD 40307 g**\n",
|
||||
" - **Size:** A super-Earth with at least 7 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located in the habitable zone of its star, this planet could potentially support liquid water and therefore life.\n",
|
||||
" - **Distance from Earth:** Approximately 42 light-years.\n",
|
||||
"\n",
|
||||
"8. **Ross 128 b**\n",
|
||||
" - **Size:** Similar to Earth, with a minimum mass of 1.35 Earth masses.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of the relatively quiet red dwarf star Ross 128. The planet has mild temperatures that could allow for liquid water.\n",
|
||||
" - **Distance from Earth:** About 11 light-years.\n",
|
||||
"\n",
|
||||
"9. **Teegarden's Star b**\n",
|
||||
" - **Size:** Comparable to Earth.\n",
|
||||
" - **Potential Habitability:** Orbits within the habitable zone of Teegarden's Star, a cool red dwarf. Conditions could be suitable for liquid water.\n",
|
||||
" - **Distance from Earth:** Approximately 12 light-years.\n",
|
||||
"\n",
|
||||
"10. **Barnard's Star b**\n",
|
||||
" - **Size:** A super-Earth with a mass of about 3.2 Earth masses.\n",
|
||||
" - **Potential Habitability:** Located just outside the traditional habitable zone, but still within a range where liquid water could exist under certain conditions.\n",
|
||||
" - **Distance from Earth:** About 6 light-years.\n",
|
||||
"\n",
|
||||
"These discoveries highlight the diverse and intriguing nature of exoplanets found in the last decade. Each of these planets adds valuable information to our understanding of planetary formation, potential habitability, and the search for extraterrestrial life. Continued advancements in detection methods and technologies promise to further expand our knowledge in the years to come.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"import yaml\n",
|
||||
"from praisonai import PraisonAI\n",
|
||||
"from google.colab import userdata\n",
|
||||
"\n",
|
||||
"# Example agent_yaml content\n",
|
||||
"agent_yaml = \"\"\"\n",
|
||||
"framework: \"crewai\"\n",
|
||||
"topic: \"Space Exploration\"\n",
|
||||
"\n",
|
||||
"roles:\n",
|
||||
" astronomer:\n",
|
||||
" role: \"Space Researcher\"\n",
|
||||
" goal: \"Discover new insights about {topic}\"\n",
|
||||
" backstory: \"You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos.\"\n",
|
||||
" tasks:\n",
|
||||
" investigate_exoplanets:\n",
|
||||
" description: \"Research and compile information about exoplanets discovered in the last decade.\"\n",
|
||||
" expected_output: \"A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth.\"\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"# Create a PraisonAI instance with the agent_yaml content\n",
|
||||
"praisonai = PraisonAI(agent_yaml=agent_yaml)\n",
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
"\n",
|
||||
"# Print the result\n",
|
||||
"print(result)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"colab": {
|
||||
"gpuType": "T4",
|
||||
"provenance": []
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0
|
||||
}
|
||||
@@ -1,244 +0,0 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "cW47IVIvdyii"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"!pip install -Uq praisonai duckduckgo_search"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"id": "Qwds0ad96Pco"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# tools.py\n",
|
||||
"from duckduckgo_search import DDGS\n",
|
||||
"from praisonai_tools import BaseTool\n",
|
||||
"\n",
|
||||
"class InternetSearchTool(BaseTool):\n",
|
||||
" name: str = \"InternetSearchTool\"\n",
|
||||
" description: str = \"Search Internet for relevant information based on a query or latest news\"\n",
|
||||
"\n",
|
||||
" def _run(self, query: str):\n",
|
||||
" ddgs = DDGS()\n",
|
||||
" results = ddgs.text(keywords=query, region='wt-wt', safesearch='moderate', max_results=5)\n",
|
||||
" return results"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"colab": {
|
||||
"base_uri": "https://localhost:8080/"
|
||||
},
|
||||
"id": "myh-_QCuHfOs",
|
||||
"outputId": "248cf6ed-f927-41fe-dcde-ed0bea53f07e"
|
||||
},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[1m\u001b[95m [2024-07-03 04:53:48][DEBUG]: == Working Agent: Space Researcher\u001b[00m\n",
|
||||
"\u001b[1m\u001b[95m [2024-07-03 04:53:48][INFO]: == Starting Task: Research and compile information about exoplanets discovered in the last decade.\u001b[00m\n",
|
||||
"\n",
|
||||
"\n",
|
||||
"\u001b[1m> Entering new CrewAgentExecutor chain...\u001b[0m\n",
|
||||
"\u001b[32;1m\u001b[1;3mI now can give a great answer.\n",
|
||||
"\n",
|
||||
"Final Answer: \n",
|
||||
"\n",
|
||||
"Over the last decade, the field of exoplanet research has experienced significant advancements, leading to the discovery of thousands of exoplanets. These discoveries have been made possible through missions like NASA's Kepler and TESS (Transiting Exoplanet Survey Satellite), as well as ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, including their size, potential habitability, and distance from Earth:\n",
|
||||
"\n",
|
||||
"1. **Kepler-452b**\n",
|
||||
" - **Size**: Approximately 1.6 times the radius of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, where liquid water could exist. It is often referred to as Earth's \"cousin.\"\n",
|
||||
" - **Distance from Earth**: About 1,400 light-years\n",
|
||||
"\n",
|
||||
"2. **Proxima Centauri b**\n",
|
||||
" - **Size**: About 1.17 times the mass of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of Proxima Centauri, the closest star to the Sun. It has the potential to have liquid water.\n",
|
||||
" - **Distance from Earth**: 4.24 light-years\n",
|
||||
"\n",
|
||||
"3. **TRAPPIST-1 System**\n",
|
||||
" - **Size**: The system includes seven Earth-sized planets\n",
|
||||
" - **Potential Habitability**: Three of the planets (TRAPPIST-1e, TRAPPIST-1f, and TRAPPIST-1g) are located in the habitable zone and could potentially support liquid water.\n",
|
||||
" - **Distance from Earth**: Approximately 39 light-years\n",
|
||||
"\n",
|
||||
"4. **LHS 1140b**\n",
|
||||
" - **Size**: About 1.4 times the size of Earth and 6.6 times its mass\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star. It has a thick atmosphere and conditions that could support life.\n",
|
||||
" - **Distance from Earth**: About 40 light-years\n",
|
||||
"\n",
|
||||
"5. **Kepler-186f**\n",
|
||||
" - **Size**: Similar to Earth in size\n",
|
||||
" - **Potential Habitability**: The first Earth-sized planet discovered in the habitable zone of another star. It has potential for liquid water on its surface.\n",
|
||||
" - **Distance from Earth**: About 500 light-years\n",
|
||||
"\n",
|
||||
"6. **K2-18b**\n",
|
||||
" - **Size**: Approximately 2.6 times the radius of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, with evidence of water vapor in its atmosphere.\n",
|
||||
" - **Distance from Earth**: About 124 light-years\n",
|
||||
"\n",
|
||||
"7. **GJ 357 d**\n",
|
||||
" - **Size**: About 6.1 times the mass of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, with the potential to have liquid water on its surface.\n",
|
||||
" - **Distance from Earth**: About 31 light-years\n",
|
||||
"\n",
|
||||
"These discoveries highlight the diversity of exoplanets in terms of size, composition, and potential habitability. The search for exoplanets is crucial for understanding the potential for life beyond Earth and the formation and evolution of planetary systems. Ongoing and future missions, such as the James Webb Space Telescope, are expected to provide even more detailed information about these distant worlds.\n",
|
||||
"\n",
|
||||
"The continuous exploration and study of exoplanets will undoubtedly lead to new insights and perhaps even the discovery of life beyond our solar system.\n",
|
||||
"\n",
|
||||
"\u001b[0m\n",
|
||||
"\n",
|
||||
"\u001b[1m> Finished chain.\u001b[0m\n",
|
||||
"\u001b[1m\u001b[92m [2024-07-03 04:53:58][DEBUG]: == [Space Researcher] Task output: Over the last decade, the field of exoplanet research has experienced significant advancements, leading to the discovery of thousands of exoplanets. These discoveries have been made possible through missions like NASA's Kepler and TESS (Transiting Exoplanet Survey Satellite), as well as ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, including their size, potential habitability, and distance from Earth:\n",
|
||||
"\n",
|
||||
"1. **Kepler-452b**\n",
|
||||
" - **Size**: Approximately 1.6 times the radius of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, where liquid water could exist. It is often referred to as Earth's \"cousin.\"\n",
|
||||
" - **Distance from Earth**: About 1,400 light-years\n",
|
||||
"\n",
|
||||
"2. **Proxima Centauri b**\n",
|
||||
" - **Size**: About 1.17 times the mass of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of Proxima Centauri, the closest star to the Sun. It has the potential to have liquid water.\n",
|
||||
" - **Distance from Earth**: 4.24 light-years\n",
|
||||
"\n",
|
||||
"3. **TRAPPIST-1 System**\n",
|
||||
" - **Size**: The system includes seven Earth-sized planets\n",
|
||||
" - **Potential Habitability**: Three of the planets (TRAPPIST-1e, TRAPPIST-1f, and TRAPPIST-1g) are located in the habitable zone and could potentially support liquid water.\n",
|
||||
" - **Distance from Earth**: Approximately 39 light-years\n",
|
||||
"\n",
|
||||
"4. **LHS 1140b**\n",
|
||||
" - **Size**: About 1.4 times the size of Earth and 6.6 times its mass\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star. It has a thick atmosphere and conditions that could support life.\n",
|
||||
" - **Distance from Earth**: About 40 light-years\n",
|
||||
"\n",
|
||||
"5. **Kepler-186f**\n",
|
||||
" - **Size**: Similar to Earth in size\n",
|
||||
" - **Potential Habitability**: The first Earth-sized planet discovered in the habitable zone of another star. It has potential for liquid water on its surface.\n",
|
||||
" - **Distance from Earth**: About 500 light-years\n",
|
||||
"\n",
|
||||
"6. **K2-18b**\n",
|
||||
" - **Size**: Approximately 2.6 times the radius of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, with evidence of water vapor in its atmosphere.\n",
|
||||
" - **Distance from Earth**: About 124 light-years\n",
|
||||
"\n",
|
||||
"7. **GJ 357 d**\n",
|
||||
" - **Size**: About 6.1 times the mass of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, with the potential to have liquid water on its surface.\n",
|
||||
" - **Distance from Earth**: About 31 light-years\n",
|
||||
"\n",
|
||||
"These discoveries highlight the diversity of exoplanets in terms of size, composition, and potential habitability. The search for exoplanets is crucial for understanding the potential for life beyond Earth and the formation and evolution of planetary systems. Ongoing and future missions, such as the James Webb Space Telescope, are expected to provide even more detailed information about these distant worlds.\n",
|
||||
"\n",
|
||||
"The continuous exploration and study of exoplanets will undoubtedly lead to new insights and perhaps even the discovery of life beyond our solar system.\n",
|
||||
"\n",
|
||||
"\u001b[00m\n",
|
||||
"### Task Output ###\n",
|
||||
"Over the last decade, the field of exoplanet research has experienced significant advancements, leading to the discovery of thousands of exoplanets. These discoveries have been made possible through missions like NASA's Kepler and TESS (Transiting Exoplanet Survey Satellite), as well as ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, including their size, potential habitability, and distance from Earth:\n",
|
||||
"\n",
|
||||
"1. **Kepler-452b**\n",
|
||||
" - **Size**: Approximately 1.6 times the radius of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, where liquid water could exist. It is often referred to as Earth's \"cousin.\"\n",
|
||||
" - **Distance from Earth**: About 1,400 light-years\n",
|
||||
"\n",
|
||||
"2. **Proxima Centauri b**\n",
|
||||
" - **Size**: About 1.17 times the mass of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of Proxima Centauri, the closest star to the Sun. It has the potential to have liquid water.\n",
|
||||
" - **Distance from Earth**: 4.24 light-years\n",
|
||||
"\n",
|
||||
"3. **TRAPPIST-1 System**\n",
|
||||
" - **Size**: The system includes seven Earth-sized planets\n",
|
||||
" - **Potential Habitability**: Three of the planets (TRAPPIST-1e, TRAPPIST-1f, and TRAPPIST-1g) are located in the habitable zone and could potentially support liquid water.\n",
|
||||
" - **Distance from Earth**: Approximately 39 light-years\n",
|
||||
"\n",
|
||||
"4. **LHS 1140b**\n",
|
||||
" - **Size**: About 1.4 times the size of Earth and 6.6 times its mass\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star. It has a thick atmosphere and conditions that could support life.\n",
|
||||
" - **Distance from Earth**: About 40 light-years\n",
|
||||
"\n",
|
||||
"5. **Kepler-186f**\n",
|
||||
" - **Size**: Similar to Earth in size\n",
|
||||
" - **Potential Habitability**: The first Earth-sized planet discovered in the habitable zone of another star. It has potential for liquid water on its surface.\n",
|
||||
" - **Distance from Earth**: About 500 light-years\n",
|
||||
"\n",
|
||||
"6. **K2-18b**\n",
|
||||
" - **Size**: Approximately 2.6 times the radius of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, with evidence of water vapor in its atmosphere.\n",
|
||||
" - **Distance from Earth**: About 124 light-years\n",
|
||||
"\n",
|
||||
"7. **GJ 357 d**\n",
|
||||
" - **Size**: About 6.1 times the mass of Earth\n",
|
||||
" - **Potential Habitability**: Located in the habitable zone of its star, with the potential to have liquid water on its surface.\n",
|
||||
" - **Distance from Earth**: About 31 light-years\n",
|
||||
"\n",
|
||||
"These discoveries highlight the diversity of exoplanets in terms of size, composition, and potential habitability. The search for exoplanets is crucial for understanding the potential for life beyond Earth and the formation and evolution of planetary systems. Ongoing and future missions, such as the James Webb Space Telescope, are expected to provide even more detailed information about these distant worlds.\n",
|
||||
"\n",
|
||||
"The continuous exploration and study of exoplanets will undoubtedly lead to new insights and perhaps even the discovery of life beyond our solar system.\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"import yaml\n",
|
||||
"from praisonai import PraisonAI\n",
|
||||
"from google.colab import userdata\n",
|
||||
"\n",
|
||||
"# Example agent_yaml content\n",
|
||||
"agent_yaml = \"\"\"\n",
|
||||
"framework: \"crewai\"\n",
|
||||
"topic: \"Space Exploration\"\n",
|
||||
"\n",
|
||||
"roles:\n",
|
||||
" astronomer:\n",
|
||||
" role: \"Space Researcher\"\n",
|
||||
" goal: \"Discover new insights about {topic}\"\n",
|
||||
" backstory: \"You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos.\"\n",
|
||||
" tasks:\n",
|
||||
" investigate_exoplanets:\n",
|
||||
" description: \"Research and compile information about exoplanets discovered in the last decade.\"\n",
|
||||
" expected_output: \"A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth.\"\n",
|
||||
" tools:\n",
|
||||
" - \"InternetSearchTool\"\n",
|
||||
"\"\"\"\n",
|
||||
"\n",
|
||||
"# Create a PraisonAI instance with the agent_yaml content\n",
|
||||
"praisonai = PraisonAI(agent_yaml=agent_yaml)\n",
|
||||
"\n",
|
||||
"# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below\n",
|
||||
"os.environ[\"OPENAI_API_KEY\"] = userdata.get('OPENAI_API_KEY') or \"ENTER OPENAI_API_KEY HERE\"\n",
|
||||
"\n",
|
||||
"# Run PraisonAI\n",
|
||||
"result = praisonai.run()\n",
|
||||
"\n",
|
||||
"# Print the result\n",
|
||||
"print(result)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"colab": {
|
||||
"gpuType": "T4",
|
||||
"provenance": []
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0
|
||||
}
|
||||
@@ -1,72 +0,0 @@
|
||||
# tools.py
|
||||
from duckduckgo_search import DDGS
|
||||
from praisonai_tools import BaseTool
|
||||
|
||||
class InternetSearchTool(BaseTool):
|
||||
name: str = "InternetSearchTool"
|
||||
description: str = "Search Internet for relevant information based on a query or latest news"
|
||||
|
||||
def _run(self, query: str):
|
||||
ddgs = DDGS()
|
||||
results = ddgs.text(keywords=query, region='wt-wt', safesearch='moderate', max_results=5)
|
||||
return results
|
||||
|
||||
from langchain_community.tools.pubmed.tool import PubmedQueryRun
|
||||
from langchain_community.tools.reddit_search.tool import RedditSearchRun
|
||||
# pip install tavily-python
|
||||
from langchain_community.utilities.tavily_search import TavilySearchAPIWrapper
|
||||
from langchain_community.utilities.you import YouSearchAPIWrapper
|
||||
# pip install youtube_search
|
||||
from langchain_community.tools import YouTubeSearchTool
|
||||
# pip install wikipedia
|
||||
from langchain_community.utilities import WikipediaAPIWrapper
|
||||
|
||||
class TavilyTool(BaseTool):
|
||||
name: str = "TavilyTool"
|
||||
description: str = "Search Tavily for relevant information based on a query."
|
||||
|
||||
def _run(self, query: str):
|
||||
api_wrapper = TavilySearchAPIWrapper()
|
||||
results = api_wrapper.results(query=query, max_results=5)
|
||||
return results
|
||||
|
||||
class YouSearchTool(BaseTool):
|
||||
name: str = "You Search Tool"
|
||||
description: str = "Search You.com for relevant information based on a query."
|
||||
|
||||
def _run(self, query: str):
|
||||
api_wrapper = YouSearchAPIWrapper()
|
||||
results = api_wrapper.results(query=query, max_results=5)
|
||||
return results
|
||||
|
||||
class WikipediaSearchTool(BaseTool):
|
||||
name: str = "WikipediaSearchTool"
|
||||
description: str = "Search Wikipedia for relevant information based on a query."
|
||||
|
||||
def _run(self, query: str):
|
||||
api_wrapper = WikipediaAPIWrapper(top_k_results=4, doc_content_chars_max=100)
|
||||
results = api_wrapper.load(query=query)
|
||||
return results
|
||||
|
||||
# pip install open-interpreter
|
||||
from interpreter import interpreter
|
||||
from praisonai_tools import BaseTool
|
||||
|
||||
class OpenInterpreterTool(BaseTool):
|
||||
name: str = "Open Interpreter Tool"
|
||||
description: str = "Use Open Interpreter configured to create and execute code based on natural language commands."
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
interpreter.auto_run = True
|
||||
|
||||
def _run(self, code: str):
|
||||
result = interpreter.chat(code)
|
||||
return result
|
||||
|
||||
# Example usage
|
||||
if __name__ == "__main__":
|
||||
tool = OpenInterpreterTool()
|
||||
code = "Plot AAPL and META's normalized stock prices"
|
||||
output = tool._run(code)
|
||||
print(output)
|
||||
@@ -1 +0,0 @@
|
||||
docs.praison.ai
|
||||
@@ -1,20 +0,0 @@
|
||||
# Minimal makefile for Sphinx documentation
|
||||
#
|
||||
|
||||
# You can set these variables from the command line, and also
|
||||
# from the environment for the first two.
|
||||
SPHINXOPTS ?=
|
||||
SPHINXBUILD ?= sphinx-build
|
||||
SOURCEDIR = .
|
||||
BUILDDIR = _build
|
||||
|
||||
# Put it first so that "make" without argument is like "make help".
|
||||
help:
|
||||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
|
||||
.PHONY: help Makefile
|
||||
|
||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||
%: Makefile
|
||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||
@@ -1,6 +0,0 @@
|
||||
# API Reference
|
||||
::: praisonai
|
||||
::: praisonai.auto
|
||||
::: praisonai.agents_generator
|
||||
::: praisonai.cli
|
||||
::: praisonai.deploy
|
||||
@@ -1,552 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.agents_generator API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.agents_generator</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-functions">Functions</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.agents_generator.disable_crewai_telemetry"><code class="name flex">
|
||||
<span>def <span class="ident">disable_crewai_telemetry</span></span>(<span>)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.agents_generator.noop"><code class="name flex">
|
||||
<span>def <span class="ident">noop</span></span>(<span>*args, **kwargs)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-classes">Classes</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.agents_generator.AgentsGenerator"><code class="flex name class">
|
||||
<span>class <span class="ident">AgentsGenerator</span></span>
|
||||
<span>(</span><span>agent_file, framework, config_list, log_level=None, agent_callback=None, task_callback=None, agent_yaml=None)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Initialize the AgentsGenerator object.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>agent_file (str): The path to the agent file.
|
||||
framework (str): The framework to be used for the agents.
|
||||
config_list (list): A list of configurations for the agents.
|
||||
log_level (int, optional): The logging level to use. Defaults to logging.INFO.
|
||||
agent_callback (callable, optional): A callback function to be executed after each agent step.
|
||||
task_callback (callable, optional): A callback function to be executed after each tool run.
|
||||
agent_yaml (str, optional): The content of the YAML file. Defaults to None.</p>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<dl>
|
||||
<dt><strong><code>agent_file</code></strong> : <code>str</code></dt>
|
||||
<dd>The path to the agent file.</dd>
|
||||
<dt><strong><code>framework</code></strong> : <code>str</code></dt>
|
||||
<dd>The framework to be used for the agents.</dd>
|
||||
<dt><strong><code>config_list</code></strong> : <code>list</code></dt>
|
||||
<dd>A list of configurations for the agents.</dd>
|
||||
<dt><strong><code>log_level</code></strong> : <code>int</code></dt>
|
||||
<dd>The logging level to use.</dd>
|
||||
<dt><strong><code>agent_callback</code></strong> : <code>callable</code>, optional</dt>
|
||||
<dd>A callback function to be executed after each agent step.</dd>
|
||||
<dt><strong><code>task_callback</code></strong> : <code>callable</code>, optional</dt>
|
||||
<dd>A callback function to be executed after each tool run.</dd>
|
||||
</dl></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class AgentsGenerator:
|
||||
def __init__(self, agent_file, framework, config_list, log_level=None, agent_callback=None, task_callback=None, agent_yaml=None):
|
||||
"""
|
||||
Initialize the AgentsGenerator object.
|
||||
|
||||
Parameters:
|
||||
agent_file (str): The path to the agent file.
|
||||
framework (str): The framework to be used for the agents.
|
||||
config_list (list): A list of configurations for the agents.
|
||||
log_level (int, optional): The logging level to use. Defaults to logging.INFO.
|
||||
agent_callback (callable, optional): A callback function to be executed after each agent step.
|
||||
task_callback (callable, optional): A callback function to be executed after each tool run.
|
||||
agent_yaml (str, optional): The content of the YAML file. Defaults to None.
|
||||
|
||||
Attributes:
|
||||
agent_file (str): The path to the agent file.
|
||||
framework (str): The framework to be used for the agents.
|
||||
config_list (list): A list of configurations for the agents.
|
||||
log_level (int): The logging level to use.
|
||||
agent_callback (callable, optional): A callback function to be executed after each agent step.
|
||||
task_callback (callable, optional): A callback function to be executed after each tool run.
|
||||
"""
|
||||
self.agent_file = agent_file
|
||||
self.framework = framework
|
||||
self.config_list = config_list
|
||||
self.log_level = log_level
|
||||
self.agent_callback = agent_callback
|
||||
self.task_callback = task_callback
|
||||
self.agent_yaml = agent_yaml
|
||||
self.log_level = log_level or logging.getLogger().getEffectiveLevel()
|
||||
if self.log_level == logging.NOTSET:
|
||||
self.log_level = os.environ.get('LOGLEVEL', 'INFO').upper()
|
||||
|
||||
logging.basicConfig(level=self.log_level, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
self.logger = logging.getLogger(__name__)
|
||||
self.logger.setLevel(self.log_level)
|
||||
|
||||
def is_function_or_decorated(self, obj):
|
||||
"""
|
||||
Checks if the given object is a function or has a __call__ method.
|
||||
|
||||
Parameters:
|
||||
obj (object): The object to be checked.
|
||||
|
||||
Returns:
|
||||
bool: True if the object is a function or has a __call__ method, False otherwise.
|
||||
"""
|
||||
return inspect.isfunction(obj) or hasattr(obj, '__call__')
|
||||
|
||||
def load_tools_from_module(self, module_path):
|
||||
"""
|
||||
Loads tools from a specified module path.
|
||||
|
||||
Parameters:
|
||||
module_path (str): The path to the module containing the tools.
|
||||
|
||||
Returns:
|
||||
dict: A dictionary containing the names of the tools as keys and the corresponding functions or objects as values.
|
||||
|
||||
Raises:
|
||||
FileNotFoundError: If the specified module path does not exist.
|
||||
"""
|
||||
spec = importlib.util.spec_from_file_location("tools_module", module_path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
return {name: obj for name, obj in inspect.getmembers(module, self.is_function_or_decorated)}
|
||||
|
||||
def load_tools_from_module_class(self, module_path):
|
||||
"""
|
||||
Loads tools from a specified module path containing classes that inherit from BaseTool or are part of langchain_community.tools package.
|
||||
|
||||
Parameters:
|
||||
module_path (str): The path to the module containing the tools.
|
||||
|
||||
Returns:
|
||||
dict: A dictionary containing the names of the tools as keys and the corresponding initialized instances of the classes as values.
|
||||
|
||||
Raises:
|
||||
FileNotFoundError: If the specified module path does not exist.
|
||||
"""
|
||||
spec = importlib.util.spec_from_file_location("tools_module", module_path)
|
||||
module = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(module)
|
||||
return {name: obj() for name, obj in inspect.getmembers(module, lambda x: inspect.isclass(x) and (x.__module__.startswith('langchain_community.tools') or issubclass(x, BaseTool)) and x is not BaseTool)}
|
||||
|
||||
def load_tools_from_package(self, package_path):
|
||||
"""
|
||||
Loads tools from a specified package path containing modules with functions or classes.
|
||||
|
||||
Parameters:
|
||||
package_path (str): The path to the package containing the tools.
|
||||
|
||||
Returns:
|
||||
dict: A dictionary containing the names of the tools as keys and the corresponding initialized instances of the classes as values.
|
||||
|
||||
Raises:
|
||||
FileNotFoundError: If the specified package path does not exist.
|
||||
|
||||
This function iterates through all the .py files in the specified package path, excluding those that start with "__". For each file, it imports the corresponding module and checks if it contains any functions or classes that can be loaded as tools. The function then returns a dictionary containing the names of the tools as keys and the corresponding initialized instances of the classes as values.
|
||||
"""
|
||||
tools_dict = {}
|
||||
for module_file in os.listdir(package_path):
|
||||
if module_file.endswith('.py') and not module_file.startswith('__'):
|
||||
module_name = f"{package_path.name}.{module_file[:-3]}" # Remove .py for import
|
||||
module = importlib.import_module(module_name)
|
||||
for name, obj in inspect.getmembers(module, self.is_function_or_decorated):
|
||||
tools_dict[name] = obj
|
||||
return tools_dict
|
||||
|
||||
def generate_crew_and_kickoff(self):
|
||||
"""
|
||||
Generates a crew of agents and initiates tasks based on the provided configuration.
|
||||
|
||||
Parameters:
|
||||
agent_file (str): The path to the agent file.
|
||||
framework (str): The framework to be used for the agents.
|
||||
config_list (list): A list of configurations for the agents.
|
||||
|
||||
Returns:
|
||||
str: The output of the tasks performed by the crew of agents.
|
||||
|
||||
Raises:
|
||||
FileNotFoundError: If the specified agent file does not exist.
|
||||
|
||||
This function first loads the agent configuration from the specified file. It then initializes the tools required for the agents based on the specified framework. If the specified framework is "autogen", it loads the LLM configuration dynamically and creates an AssistantAgent for each role in the configuration. It then adds tools to the agents if specified in the configuration. Finally, it prepares tasks for the agents based on the configuration and initiates the tasks using the crew of agents. If the specified framework is not "autogen", it creates a crew of agents and initiates tasks based on the configuration.
|
||||
"""
|
||||
if self.agent_yaml:
|
||||
config = yaml.safe_load(self.agent_yaml)
|
||||
else:
|
||||
if self.agent_file == '/app/api:app' or self.agent_file == 'api:app':
|
||||
self.agent_file = 'agents.yaml'
|
||||
try:
|
||||
with open(self.agent_file, 'r') as f:
|
||||
config = yaml.safe_load(f)
|
||||
except FileNotFoundError:
|
||||
print(f"File not found: {self.agent_file}")
|
||||
return
|
||||
|
||||
topic = config['topic']
|
||||
tools_dict = {
|
||||
'CodeDocsSearchTool': CodeDocsSearchTool(),
|
||||
'CSVSearchTool': CSVSearchTool(),
|
||||
'DirectorySearchTool': DirectorySearchTool(),
|
||||
'DOCXSearchTool': DOCXSearchTool(),
|
||||
'DirectoryReadTool': DirectoryReadTool(),
|
||||
'FileReadTool': FileReadTool(),
|
||||
# 'GithubSearchTool': GithubSearchTool(),
|
||||
# 'SeperDevTool': SeperDevTool(),
|
||||
'TXTSearchTool': TXTSearchTool(),
|
||||
'JSONSearchTool': JSONSearchTool(),
|
||||
'MDXSearchTool': MDXSearchTool(),
|
||||
'PDFSearchTool': PDFSearchTool(),
|
||||
# 'PGSearchTool': PGSearchTool(),
|
||||
'RagTool': RagTool(),
|
||||
'ScrapeElementFromWebsiteTool': ScrapeElementFromWebsiteTool(),
|
||||
'ScrapeWebsiteTool': ScrapeWebsiteTool(),
|
||||
'WebsiteSearchTool': WebsiteSearchTool(),
|
||||
'XMLSearchTool': XMLSearchTool(),
|
||||
'YoutubeChannelSearchTool': YoutubeChannelSearchTool(),
|
||||
'YoutubeVideoSearchTool': YoutubeVideoSearchTool(),
|
||||
}
|
||||
root_directory = os.getcwd()
|
||||
tools_py_path = os.path.join(root_directory, 'tools.py')
|
||||
tools_dir_path = Path(root_directory) / 'tools'
|
||||
|
||||
if os.path.isfile(tools_py_path):
|
||||
tools_dict.update(self.load_tools_from_module_class(tools_py_path))
|
||||
self.logger.debug("tools.py exists in the root directory. Loading tools.py and skipping tools folder.")
|
||||
elif tools_dir_path.is_dir():
|
||||
tools_dict.update(self.load_tools_from_module_class(tools_dir_path))
|
||||
self.logger.debug("tools folder exists in the root directory")
|
||||
|
||||
framework = self.framework or config.get('framework')
|
||||
|
||||
agents = {}
|
||||
tasks = []
|
||||
if framework == "autogen":
|
||||
# Load the LLM configuration dynamically
|
||||
# print(self.config_list)
|
||||
llm_config = {"config_list": self.config_list}
|
||||
|
||||
if agentops_exists:
|
||||
agentops.init(os.environ.get("AGENTOPS_API_KEY"), tags=["autogen"])
|
||||
# Assuming the user proxy agent is set up as per your requirements
|
||||
user_proxy = autogen.UserProxyAgent(
|
||||
name="User",
|
||||
human_input_mode="NEVER",
|
||||
is_termination_msg=lambda x: (x.get("content") or "").rstrip().rstrip(".").lower().endswith("terminate") or "TERMINATE" in (x.get("content") or ""),
|
||||
code_execution_config={
|
||||
"work_dir": "coding",
|
||||
"use_docker": False,
|
||||
},
|
||||
# additional setup for the user proxy agent
|
||||
)
|
||||
|
||||
for role, details in config['roles'].items():
|
||||
agent_name = details['role'].format(topic=topic).replace("{topic}", topic)
|
||||
agent_goal = details['goal'].format(topic=topic)
|
||||
# Creating an AssistantAgent for each role dynamically
|
||||
agents[role] = autogen.AssistantAgent(
|
||||
name=agent_name,
|
||||
llm_config=llm_config,
|
||||
system_message=details['backstory'].format(topic=topic)+". Must Reply \"TERMINATE\" in the end when everything is done.",
|
||||
)
|
||||
for tool in details.get('tools', []):
|
||||
if tool in tools_dict:
|
||||
try:
|
||||
tool_class = globals()[f'autogen_{type(tools_dict[tool]).__name__}']
|
||||
print(f"Found {tool_class.__name__} for {tool}")
|
||||
except KeyError:
|
||||
print(f"Warning: autogen_{type(tools_dict[tool]).__name__} function not found. Skipping this tool.")
|
||||
continue
|
||||
tool_class(agents[role], user_proxy)
|
||||
|
||||
# Preparing tasks for initiate_chats
|
||||
for task_name, task_details in details.get('tasks', {}).items():
|
||||
description_filled = task_details['description'].format(topic=topic)
|
||||
expected_output_filled = task_details['expected_output'].format(topic=topic)
|
||||
|
||||
chat_task = {
|
||||
"recipient": agents[role],
|
||||
"message": description_filled,
|
||||
"summary_method": "last_msg",
|
||||
# Additional fields like carryover can be added based on dependencies
|
||||
}
|
||||
tasks.append(chat_task)
|
||||
response = user_proxy.initiate_chats(tasks)
|
||||
result = "### Output ###\n"+response[-1].summary if hasattr(response[-1], 'summary') else ""
|
||||
if agentops_exists:
|
||||
agentops.end_session("Success")
|
||||
else: # framework=crewai
|
||||
if agentops_exists:
|
||||
agentops.init(os.environ.get("AGENTOPS_API_KEY"), tags=["crewai"])
|
||||
|
||||
tasks_dict = {}
|
||||
|
||||
for role, details in config['roles'].items():
|
||||
role_filled = details['role'].format(topic=topic)
|
||||
goal_filled = details['goal'].format(topic=topic)
|
||||
backstory_filled = details['backstory'].format(topic=topic)
|
||||
|
||||
# Adding tools to the agent if exists
|
||||
agent_tools = [tools_dict[tool] for tool in details.get('tools', []) if tool in tools_dict]
|
||||
|
||||
llm_model = details.get('llm') # Get the llm configuration
|
||||
if llm_model:
|
||||
llm = PraisonAIModel(
|
||||
model=llm_model.get("model", os.environ.get("MODEL_NAME", "openai/gpt-4o")),
|
||||
).get_model()
|
||||
else:
|
||||
llm = PraisonAIModel().get_model()
|
||||
|
||||
function_calling_llm_model = details.get('function_calling_llm')
|
||||
if function_calling_llm_model:
|
||||
function_calling_llm = PraisonAIModel(
|
||||
model=function_calling_llm_model.get("model", os.environ.get("MODEL_NAME", "openai/gpt-4o")),
|
||||
).get_model()
|
||||
else:
|
||||
function_calling_llm = PraisonAIModel().get_model()
|
||||
|
||||
agent = Agent(
|
||||
role=role_filled,
|
||||
goal=goal_filled,
|
||||
backstory=backstory_filled,
|
||||
tools=agent_tools,
|
||||
allow_delegation=details.get('allow_delegation', False),
|
||||
llm=llm,
|
||||
function_calling_llm=function_calling_llm,
|
||||
max_iter=details.get('max_iter', 15),
|
||||
max_rpm=details.get('max_rpm'),
|
||||
max_execution_time=details.get('max_execution_time'),
|
||||
verbose=details.get('verbose', True),
|
||||
cache=details.get('cache', True),
|
||||
system_template=details.get('system_template'),
|
||||
prompt_template=details.get('prompt_template'),
|
||||
response_template=details.get('response_template'),
|
||||
)
|
||||
|
||||
# Set agent callback if provided
|
||||
if self.agent_callback:
|
||||
agent.step_callback = self.agent_callback
|
||||
|
||||
agents[role] = agent
|
||||
|
||||
for task_name, task_details in details.get('tasks', {}).items():
|
||||
description_filled = task_details['description'].format(topic=topic)
|
||||
expected_output_filled = task_details['expected_output'].format(topic=topic)
|
||||
|
||||
task = Task(
|
||||
description=description_filled, # Clear, concise statement of what the task entails
|
||||
expected_output=expected_output_filled, # Detailed description of what task's completion looks like
|
||||
agent=agent, # The agent responsible for the task
|
||||
tools=task_details.get('tools', []), # Functions or capabilities the agent can utilize
|
||||
async_execution=task_details.get('async_execution') if task_details.get('async_execution') is not None else False, # Execute asynchronously if set
|
||||
context=[], ## TODO:
|
||||
config=task_details.get('config') if task_details.get('config') is not None else {}, # Additional configuration details
|
||||
output_json=task_details.get('output_json') if task_details.get('output_json') is not None else None, # Outputs a JSON object
|
||||
output_pydantic=task_details.get('output_pydantic') if task_details.get('output_pydantic') is not None else None, # Outputs a Pydantic model object
|
||||
output_file=task_details.get('output_file') if task_details.get('output_file') is not None else "", # Saves the task output to a file
|
||||
callback=task_details.get('callback') if task_details.get('callback') is not None else None, # Python callable executed with the task's output
|
||||
human_input=task_details.get('human_input') if task_details.get('human_input') is not None else False, # Indicates if the task requires human feedback
|
||||
create_directory=task_details.get('create_directory') if task_details.get('create_directory') is not None else False # Indicates if a directory needs to be created
|
||||
)
|
||||
|
||||
# Set tool callback if provided
|
||||
if self.task_callback:
|
||||
task.callback = self.task_callback
|
||||
|
||||
tasks.append(task)
|
||||
tasks_dict[task_name] = task
|
||||
|
||||
for role, details in config['roles'].items():
|
||||
for task_name, task_details in details.get('tasks', {}).items():
|
||||
task = tasks_dict[task_name]
|
||||
context_tasks = [tasks_dict[ctx] for ctx in task_details.get('context', []) if ctx in tasks_dict]
|
||||
task.context = context_tasks
|
||||
|
||||
crew = Crew(
|
||||
agents=list(agents.values()),
|
||||
tasks=tasks,
|
||||
verbose=2
|
||||
)
|
||||
|
||||
self.logger.debug("Final Crew Configuration:")
|
||||
self.logger.debug(f"Agents: {crew.agents}")
|
||||
self.logger.debug(f"Tasks: {crew.tasks}")
|
||||
|
||||
response = crew.kickoff()
|
||||
result = f"### Task Output ###\n{response}"
|
||||
if agentops_exists:
|
||||
agentops.end_session("Success")
|
||||
return result</code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.agents_generator.AgentsGenerator.generate_crew_and_kickoff"><code class="name flex">
|
||||
<span>def <span class="ident">generate_crew_and_kickoff</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Generates a crew of agents and initiates tasks based on the provided configuration.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>agent_file (str): The path to the agent file.
|
||||
framework (str): The framework to be used for the agents.
|
||||
config_list (list): A list of configurations for the agents.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>str</code></dt>
|
||||
<dd>The output of the tasks performed by the crew of agents.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>FileNotFoundError</code></dt>
|
||||
<dd>If the specified agent file does not exist.</dd>
|
||||
</dl>
|
||||
<p>This function first loads the agent configuration from the specified file. It then initializes the tools required for the agents based on the specified framework. If the specified framework is "autogen", it loads the LLM configuration dynamically and creates an AssistantAgent for each role in the configuration. It then adds tools to the agents if specified in the configuration. Finally, it prepares tasks for the agents based on the configuration and initiates the tasks using the crew of agents. If the specified framework is not "autogen", it creates a crew of agents and initiates tasks based on the configuration.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.agents_generator.AgentsGenerator.is_function_or_decorated"><code class="name flex">
|
||||
<span>def <span class="ident">is_function_or_decorated</span></span>(<span>self, obj)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Checks if the given object is a function or has a <strong>call</strong> method.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>obj (object): The object to be checked.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>bool</code></dt>
|
||||
<dd>True if the object is a function or has a <strong>call</strong> method, False otherwise.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.agents_generator.AgentsGenerator.load_tools_from_module"><code class="name flex">
|
||||
<span>def <span class="ident">load_tools_from_module</span></span>(<span>self, module_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Loads tools from a specified module path.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>module_path (str): The path to the module containing the tools.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>dict</code></dt>
|
||||
<dd>A dictionary containing the names of the tools as keys and the corresponding functions or objects as values.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>FileNotFoundError</code></dt>
|
||||
<dd>If the specified module path does not exist.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.agents_generator.AgentsGenerator.load_tools_from_module_class"><code class="name flex">
|
||||
<span>def <span class="ident">load_tools_from_module_class</span></span>(<span>self, module_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Loads tools from a specified module path containing classes that inherit from BaseTool or are part of langchain_community.tools package.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>module_path (str): The path to the module containing the tools.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>dict</code></dt>
|
||||
<dd>A dictionary containing the names of the tools as keys and the corresponding initialized instances of the classes as values.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>FileNotFoundError</code></dt>
|
||||
<dd>If the specified module path does not exist.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.agents_generator.AgentsGenerator.load_tools_from_package"><code class="name flex">
|
||||
<span>def <span class="ident">load_tools_from_package</span></span>(<span>self, package_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Loads tools from a specified package path containing modules with functions or classes.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>package_path (str): The path to the package containing the tools.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>dict</code></dt>
|
||||
<dd>A dictionary containing the names of the tools as keys and the corresponding initialized instances of the classes as values.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>FileNotFoundError</code></dt>
|
||||
<dd>If the specified package path does not exist.</dd>
|
||||
</dl>
|
||||
<p>This function iterates through all the .py files in the specified package path, excluding those that start with "__". For each file, it imports the corresponding module and checks if it contains any functions or classes that can be loaded as tools. The function then returns a dictionary containing the names of the tools as keys and the corresponding initialized instances of the classes as values.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-functions">Functions</a></h3>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.agents_generator.disable_crewai_telemetry" href="#praisonai.agents_generator.disable_crewai_telemetry">disable_crewai_telemetry</a></code></li>
|
||||
<li><code><a title="praisonai.agents_generator.noop" href="#praisonai.agents_generator.noop">noop</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-classes">Classes</a></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.agents_generator.AgentsGenerator" href="#praisonai.agents_generator.AgentsGenerator">AgentsGenerator</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.agents_generator.AgentsGenerator.generate_crew_and_kickoff" href="#praisonai.agents_generator.AgentsGenerator.generate_crew_and_kickoff">generate_crew_and_kickoff</a></code></li>
|
||||
<li><code><a title="praisonai.agents_generator.AgentsGenerator.is_function_or_decorated" href="#praisonai.agents_generator.AgentsGenerator.is_function_or_decorated">is_function_or_decorated</a></code></li>
|
||||
<li><code><a title="praisonai.agents_generator.AgentsGenerator.load_tools_from_module" href="#praisonai.agents_generator.AgentsGenerator.load_tools_from_module">load_tools_from_module</a></code></li>
|
||||
<li><code><a title="praisonai.agents_generator.AgentsGenerator.load_tools_from_module_class" href="#praisonai.agents_generator.AgentsGenerator.load_tools_from_module_class">load_tools_from_module_class</a></code></li>
|
||||
<li><code><a title="praisonai.agents_generator.AgentsGenerator.load_tools_from_package" href="#praisonai.agents_generator.AgentsGenerator.load_tools_from_package">load_tools_from_package</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,622 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.auto API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.auto</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-classes">Classes</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.auto.AutoGenerator"><code class="flex name class">
|
||||
<span>class <span class="ident">AutoGenerator</span></span>
|
||||
<span>(</span><span>topic='Movie Story writing about AI', agent_file='test.yaml', framework='crewai', config_list: Optional[List[Dict]] = None)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Initialize the AutoGenerator class with the specified topic, agent file, and framework.
|
||||
Note: autogen framework is different from this AutoGenerator class.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<dl>
|
||||
<dt><strong><code>topic</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The topic for the generated team structure. Defaults to "Movie Story writing about AI".</dd>
|
||||
<dt><strong><code>agent_file</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The name of the YAML file to save the generated team structure. Defaults to "test.yaml".</dd>
|
||||
<dt><strong><code>framework</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The framework for the generated team structure. Defaults to "crewai".</dd>
|
||||
<dt><strong><code>config_list</code></strong> : <code>Optional[List[Dict]]</code>, optional</dt>
|
||||
<dd>A list containing the configuration details for the OpenAI API.
|
||||
If None, it defaults to using environment variables or hardcoded values.</dd>
|
||||
</dl>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<dl>
|
||||
<dt><strong><code>config_list</code></strong> : <code>list</code></dt>
|
||||
<dd>A list containing the configuration details for the OpenAI API.</dd>
|
||||
<dt><strong><code>topic</code></strong> : <code>str</code></dt>
|
||||
<dd>The specified topic for the generated team structure.</dd>
|
||||
<dt><strong><code>agent_file</code></strong> : <code>str</code></dt>
|
||||
<dd>The specified name of the YAML file to save the generated team structure.</dd>
|
||||
<dt><strong><code>framework</code></strong> : <code>str</code></dt>
|
||||
<dd>The specified framework for the generated team structure.</dd>
|
||||
<dt><strong><code>client</code></strong> : <code>instructor.Client</code></dt>
|
||||
<dd>An instance of the instructor.Client class initialized with the specified OpenAI API configuration.</dd>
|
||||
</dl></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class AutoGenerator:
|
||||
def __init__(self, topic="Movie Story writing about AI", agent_file="test.yaml", framework="crewai", config_list: Optional[List[Dict]] = None):
|
||||
"""
|
||||
Initialize the AutoGenerator class with the specified topic, agent file, and framework.
|
||||
Note: autogen framework is different from this AutoGenerator class.
|
||||
|
||||
Args:
|
||||
topic (str, optional): The topic for the generated team structure. Defaults to "Movie Story writing about AI".
|
||||
agent_file (str, optional): The name of the YAML file to save the generated team structure. Defaults to "test.yaml".
|
||||
framework (str, optional): The framework for the generated team structure. Defaults to "crewai".
|
||||
config_list (Optional[List[Dict]], optional): A list containing the configuration details for the OpenAI API.
|
||||
If None, it defaults to using environment variables or hardcoded values.
|
||||
Attributes:
|
||||
config_list (list): A list containing the configuration details for the OpenAI API.
|
||||
topic (str): The specified topic for the generated team structure.
|
||||
agent_file (str): The specified name of the YAML file to save the generated team structure.
|
||||
framework (str): The specified framework for the generated team structure.
|
||||
client (instructor.Client): An instance of the instructor.Client class initialized with the specified OpenAI API configuration.
|
||||
"""
|
||||
self.config_list = config_list or [
|
||||
{
|
||||
'model': os.environ.get("OPENAI_MODEL_NAME", "gpt-4o"),
|
||||
'base_url': os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1"),
|
||||
'api_key': os.environ.get("OPENAI_API_KEY")
|
||||
}
|
||||
]
|
||||
self.topic = topic
|
||||
self.agent_file = agent_file
|
||||
self.framework = framework or "crewai"
|
||||
self.client = instructor.patch(
|
||||
OpenAI(
|
||||
base_url=self.config_list[0]['base_url'],
|
||||
api_key=os.getenv("OPENAI_API_KEY"),
|
||||
),
|
||||
mode=instructor.Mode.JSON,
|
||||
)
|
||||
|
||||
def generate(self):
|
||||
"""
|
||||
Generates a team structure for the specified topic.
|
||||
|
||||
Args:
|
||||
None
|
||||
|
||||
Returns:
|
||||
str: The full path of the YAML file containing the generated team structure.
|
||||
|
||||
Raises:
|
||||
Exception: If the generation process fails.
|
||||
|
||||
Usage:
|
||||
generator = AutoGenerator(framework="crewai", topic="Create a movie script about Cat in Mars")
|
||||
path = generator.generate()
|
||||
print(path)
|
||||
"""
|
||||
response = self.client.chat.completions.create(
|
||||
model=self.config_list[0]['model'],
|
||||
response_model=TeamStructure,
|
||||
max_retries=10,
|
||||
messages=[
|
||||
{"role": "system", "content": "You are a helpful assistant designed to output complex team structures."},
|
||||
{"role": "user", "content": self.get_user_content()}
|
||||
]
|
||||
)
|
||||
json_data = json.loads(response.model_dump_json())
|
||||
self.convert_and_save(json_data)
|
||||
full_path = os.path.abspath(self.agent_file)
|
||||
return full_path
|
||||
|
||||
def convert_and_save(self, json_data):
|
||||
"""Converts the provided JSON data into the desired YAML format and saves it to a file.
|
||||
|
||||
Args:
|
||||
json_data (dict): The JSON data representing the team structure.
|
||||
topic (str, optional): The topic to be inserted into the YAML. Defaults to "Artificial Intelligence".
|
||||
agent_file (str, optional): The name of the YAML file to save. Defaults to "test.yaml".
|
||||
"""
|
||||
|
||||
yaml_data = {
|
||||
"framework": self.framework,
|
||||
"topic": self.topic,
|
||||
"roles": {},
|
||||
"dependencies": []
|
||||
}
|
||||
|
||||
for role_id, role_details in json_data['roles'].items():
|
||||
yaml_data['roles'][role_id] = {
|
||||
"backstory": "" + role_details['backstory'],
|
||||
"goal": role_details['goal'],
|
||||
"role": role_details['role'],
|
||||
"tasks": {},
|
||||
# "tools": role_details.get('tools', []),
|
||||
"tools": ['']
|
||||
}
|
||||
|
||||
for task_id, task_details in role_details['tasks'].items():
|
||||
yaml_data['roles'][role_id]['tasks'][task_id] = {
|
||||
"description": "" + task_details['description'],
|
||||
"expected_output": "" + task_details['expected_output']
|
||||
}
|
||||
|
||||
# Save to YAML file, maintaining the order
|
||||
with open(self.agent_file, 'w') as f:
|
||||
yaml.dump(yaml_data, f, allow_unicode=True, sort_keys=False)
|
||||
|
||||
def get_user_content(self):
|
||||
"""
|
||||
Generates a prompt for the OpenAI API to generate a team structure.
|
||||
|
||||
Args:
|
||||
None
|
||||
|
||||
Returns:
|
||||
str: The prompt for the OpenAI API.
|
||||
|
||||
Usage:
|
||||
generator = AutoGenerator(framework="crewai", topic="Create a movie script about Cat in Mars")
|
||||
prompt = generator.get_user_content()
|
||||
print(prompt)
|
||||
"""
|
||||
user_content = """Generate a team structure for \"""" + self.topic + """\" task.
|
||||
No Input data will be provided to the team.
|
||||
The team will work in sequence. First role will pass the output to the next role, and so on.
|
||||
The last role will generate the final output.
|
||||
Think step by step.
|
||||
With maximum 3 roles, each with 1 task. Include role goals, backstories, task descriptions, and expected outputs.
|
||||
List of Available Tools: CodeDocsSearchTool, CSVSearchTool, DirectorySearchTool, DOCXSearchTool, DirectoryReadTool, FileReadTool, TXTSearchTool, JSONSearchTool, MDXSearchTool, PDFSearchTool, RagTool, ScrapeElementFromWebsiteTool, ScrapeWebsiteTool, WebsiteSearchTool, XMLSearchTool, YoutubeChannelSearchTool, YoutubeVideoSearchTool.
|
||||
Only use Available Tools. Do Not use any other tools.
|
||||
Example Below:
|
||||
Use below example to understand the structure of the output.
|
||||
The final role you create should satisfy the provided task: """ + self.topic + """.
|
||||
{
|
||||
"roles": {
|
||||
"narrative_designer": {
|
||||
"role": "Narrative Designer",
|
||||
"goal": "Create AI storylines",
|
||||
"backstory": "Skilled in narrative development for AI, with a focus on story resonance.",
|
||||
"tools": ["ScrapeWebsiteTool"],
|
||||
"tasks": {
|
||||
"story_concept_development": {
|
||||
"description": "Craft a unique AI story concept with depth and engagement using concept from this page the content https://www.asthebirdfliesblog.com/posts/how-to-write-book-story-development .",
|
||||
"expected_output": "Document with narrative arcs, character bios, and settings."
|
||||
}
|
||||
}
|
||||
},
|
||||
"scriptwriter": {
|
||||
"role": "Scriptwriter",
|
||||
"goal": "Write scripts from AI concepts",
|
||||
"backstory": "Expert in dialogue and script structure, translating concepts into scripts.",
|
||||
"tasks": {
|
||||
"scriptwriting_task": {
|
||||
"description": "Turn narrative concepts into scripts, including dialogue and scenes.",
|
||||
"expected_output": "Production-ready script with dialogue and scene details."
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
return user_content</code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.auto.AutoGenerator.convert_and_save"><code class="name flex">
|
||||
<span>def <span class="ident">convert_and_save</span></span>(<span>self, json_data)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Converts the provided JSON data into the desired YAML format and saves it to a file.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<dl>
|
||||
<dt><strong><code>json_data</code></strong> : <code>dict</code></dt>
|
||||
<dd>The JSON data representing the team structure.</dd>
|
||||
<dt><strong><code>topic</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The topic to be inserted into the YAML. Defaults to "Artificial Intelligence".</dd>
|
||||
<dt><strong><code>agent_file</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The name of the YAML file to save. Defaults to "test.yaml".</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.AutoGenerator.generate"><code class="name flex">
|
||||
<span>def <span class="ident">generate</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Generates a team structure for the specified topic.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<p>None</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>str</code></dt>
|
||||
<dd>The full path of the YAML file containing the generated team structure.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>Exception</code></dt>
|
||||
<dd>If the generation process fails.</dd>
|
||||
</dl>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<p>generator = AutoGenerator(framework="crewai", topic="Create a movie script about Cat in Mars")
|
||||
path = generator.generate()
|
||||
print(path)</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.AutoGenerator.get_user_content"><code class="name flex">
|
||||
<span>def <span class="ident">get_user_content</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Generates a prompt for the OpenAI API to generate a team structure.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<p>None</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>str</code></dt>
|
||||
<dd>The prompt for the OpenAI API.</dd>
|
||||
</dl>
|
||||
<h2 id="usage">Usage</h2>
|
||||
<p>generator = AutoGenerator(framework="crewai", topic="Create a movie script about Cat in Mars")
|
||||
prompt = generator.get_user_content()
|
||||
print(prompt)</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails"><code class="flex name class">
|
||||
<span>class <span class="ident">RoleDetails</span></span>
|
||||
<span>(</span><span>**data: Any)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Usage docs: <a href="https://docs.pydantic.dev/2.8/concepts/models/">https://docs.pydantic.dev/2.8/concepts/models/</a></p>
|
||||
<p>A base class for creating Pydantic models.</p>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<dl>
|
||||
<dt><strong><code>__class_vars__</code></strong></dt>
|
||||
<dd>The names of classvars defined on the model.</dd>
|
||||
<dt><strong><code>__private_attributes__</code></strong></dt>
|
||||
<dd>Metadata about the private attributes of the model.</dd>
|
||||
<dt><strong><code>__signature__</code></strong></dt>
|
||||
<dd>The signature for instantiating the model.</dd>
|
||||
<dt><strong><code>__pydantic_complete__</code></strong></dt>
|
||||
<dd>Whether model building is completed, or if there are still undefined fields.</dd>
|
||||
<dt><strong><code>__pydantic_core_schema__</code></strong></dt>
|
||||
<dd>The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.</dd>
|
||||
<dt><strong><code>__pydantic_custom_init__</code></strong></dt>
|
||||
<dd>Whether the model has a custom <code>__init__</code> function.</dd>
|
||||
<dt><strong><code>__pydantic_decorators__</code></strong></dt>
|
||||
<dd>Metadata containing the decorators defined on the model.
|
||||
This replaces <code>Model.__validators__</code> and <code>Model.__root_validators__</code> from Pydantic V1.</dd>
|
||||
<dt><strong><code>__pydantic_generic_metadata__</code></strong></dt>
|
||||
<dd>Metadata for generic models; contains data used for a similar purpose to
|
||||
<strong>args</strong>, <strong>origin</strong>, <strong>parameters</strong> in typing-module generics. May eventually be replaced by these.</dd>
|
||||
<dt><strong><code>__pydantic_parent_namespace__</code></strong></dt>
|
||||
<dd>Parent namespace of the model, used for automatic rebuilding of models.</dd>
|
||||
<dt><strong><code>__pydantic_post_init__</code></strong></dt>
|
||||
<dd>The name of the post-init method for the model, if defined.</dd>
|
||||
<dt><strong><code>__pydantic_root_model__</code></strong></dt>
|
||||
<dd>Whether the model is a <code>RootModel</code>.</dd>
|
||||
<dt><strong><code>__pydantic_serializer__</code></strong></dt>
|
||||
<dd>The pydantic-core SchemaSerializer used to dump instances of the model.</dd>
|
||||
<dt><strong><code>__pydantic_validator__</code></strong></dt>
|
||||
<dd>The pydantic-core SchemaValidator used to validate instances of the model.</dd>
|
||||
<dt><strong><code>__pydantic_extra__</code></strong></dt>
|
||||
<dd>An instance attribute with the values of extra fields from validation when
|
||||
<code>model_config['extra'] == 'allow'</code>.</dd>
|
||||
<dt><strong><code>__pydantic_fields_set__</code></strong></dt>
|
||||
<dd>An instance attribute with the names of fields explicitly set.</dd>
|
||||
<dt><strong><code>__pydantic_private__</code></strong></dt>
|
||||
<dd>Instance attribute with the values of private attributes set on the model instance.</dd>
|
||||
</dl>
|
||||
<p>Create a new model by parsing and validating input data from keyword arguments.</p>
|
||||
<p>Raises [<code>ValidationError</code>][pydantic_core.ValidationError] if the input data cannot be
|
||||
validated to form a valid model.</p>
|
||||
<p><code>self</code> is explicitly positional-only to allow <code>self</code> as a field name.</p></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class RoleDetails(BaseModel):
|
||||
role: str
|
||||
goal: str
|
||||
backstory: str
|
||||
tasks: Dict[str, TaskDetails]
|
||||
tools: List[str]</code></pre>
|
||||
</details>
|
||||
<h3>Ancestors</h3>
|
||||
<ul class="hlist">
|
||||
<li>pydantic.main.BaseModel</li>
|
||||
</ul>
|
||||
<h3>Class variables</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.auto.RoleDetails.backstory"><code class="name">var <span class="ident">backstory</span> : str</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.goal"><code class="name">var <span class="ident">goal</span> : str</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.model_computed_fields"><code class="name">var <span class="ident">model_computed_fields</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.model_config"><code class="name">var <span class="ident">model_config</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.model_fields"><code class="name">var <span class="ident">model_fields</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.role"><code class="name">var <span class="ident">role</span> : str</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.tasks"><code class="name">var <span class="ident">tasks</span> : Dict[str, <a title="praisonai.auto.TaskDetails" href="#praisonai.auto.TaskDetails">TaskDetails</a>]</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.RoleDetails.tools"><code class="name">var <span class="ident">tools</span> : List[str]</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TaskDetails"><code class="flex name class">
|
||||
<span>class <span class="ident">TaskDetails</span></span>
|
||||
<span>(</span><span>**data: Any)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Usage docs: <a href="https://docs.pydantic.dev/2.8/concepts/models/">https://docs.pydantic.dev/2.8/concepts/models/</a></p>
|
||||
<p>A base class for creating Pydantic models.</p>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<dl>
|
||||
<dt><strong><code>__class_vars__</code></strong></dt>
|
||||
<dd>The names of classvars defined on the model.</dd>
|
||||
<dt><strong><code>__private_attributes__</code></strong></dt>
|
||||
<dd>Metadata about the private attributes of the model.</dd>
|
||||
<dt><strong><code>__signature__</code></strong></dt>
|
||||
<dd>The signature for instantiating the model.</dd>
|
||||
<dt><strong><code>__pydantic_complete__</code></strong></dt>
|
||||
<dd>Whether model building is completed, or if there are still undefined fields.</dd>
|
||||
<dt><strong><code>__pydantic_core_schema__</code></strong></dt>
|
||||
<dd>The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.</dd>
|
||||
<dt><strong><code>__pydantic_custom_init__</code></strong></dt>
|
||||
<dd>Whether the model has a custom <code>__init__</code> function.</dd>
|
||||
<dt><strong><code>__pydantic_decorators__</code></strong></dt>
|
||||
<dd>Metadata containing the decorators defined on the model.
|
||||
This replaces <code>Model.__validators__</code> and <code>Model.__root_validators__</code> from Pydantic V1.</dd>
|
||||
<dt><strong><code>__pydantic_generic_metadata__</code></strong></dt>
|
||||
<dd>Metadata for generic models; contains data used for a similar purpose to
|
||||
<strong>args</strong>, <strong>origin</strong>, <strong>parameters</strong> in typing-module generics. May eventually be replaced by these.</dd>
|
||||
<dt><strong><code>__pydantic_parent_namespace__</code></strong></dt>
|
||||
<dd>Parent namespace of the model, used for automatic rebuilding of models.</dd>
|
||||
<dt><strong><code>__pydantic_post_init__</code></strong></dt>
|
||||
<dd>The name of the post-init method for the model, if defined.</dd>
|
||||
<dt><strong><code>__pydantic_root_model__</code></strong></dt>
|
||||
<dd>Whether the model is a <code>RootModel</code>.</dd>
|
||||
<dt><strong><code>__pydantic_serializer__</code></strong></dt>
|
||||
<dd>The pydantic-core SchemaSerializer used to dump instances of the model.</dd>
|
||||
<dt><strong><code>__pydantic_validator__</code></strong></dt>
|
||||
<dd>The pydantic-core SchemaValidator used to validate instances of the model.</dd>
|
||||
<dt><strong><code>__pydantic_extra__</code></strong></dt>
|
||||
<dd>An instance attribute with the values of extra fields from validation when
|
||||
<code>model_config['extra'] == 'allow'</code>.</dd>
|
||||
<dt><strong><code>__pydantic_fields_set__</code></strong></dt>
|
||||
<dd>An instance attribute with the names of fields explicitly set.</dd>
|
||||
<dt><strong><code>__pydantic_private__</code></strong></dt>
|
||||
<dd>Instance attribute with the values of private attributes set on the model instance.</dd>
|
||||
</dl>
|
||||
<p>Create a new model by parsing and validating input data from keyword arguments.</p>
|
||||
<p>Raises [<code>ValidationError</code>][pydantic_core.ValidationError] if the input data cannot be
|
||||
validated to form a valid model.</p>
|
||||
<p><code>self</code> is explicitly positional-only to allow <code>self</code> as a field name.</p></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class TaskDetails(BaseModel):
|
||||
description: str
|
||||
expected_output: str</code></pre>
|
||||
</details>
|
||||
<h3>Ancestors</h3>
|
||||
<ul class="hlist">
|
||||
<li>pydantic.main.BaseModel</li>
|
||||
</ul>
|
||||
<h3>Class variables</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.auto.TaskDetails.description"><code class="name">var <span class="ident">description</span> : str</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TaskDetails.expected_output"><code class="name">var <span class="ident">expected_output</span> : str</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TaskDetails.model_computed_fields"><code class="name">var <span class="ident">model_computed_fields</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TaskDetails.model_config"><code class="name">var <span class="ident">model_config</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TaskDetails.model_fields"><code class="name">var <span class="ident">model_fields</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TeamStructure"><code class="flex name class">
|
||||
<span>class <span class="ident">TeamStructure</span></span>
|
||||
<span>(</span><span>**data: Any)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Usage docs: <a href="https://docs.pydantic.dev/2.8/concepts/models/">https://docs.pydantic.dev/2.8/concepts/models/</a></p>
|
||||
<p>A base class for creating Pydantic models.</p>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<dl>
|
||||
<dt><strong><code>__class_vars__</code></strong></dt>
|
||||
<dd>The names of classvars defined on the model.</dd>
|
||||
<dt><strong><code>__private_attributes__</code></strong></dt>
|
||||
<dd>Metadata about the private attributes of the model.</dd>
|
||||
<dt><strong><code>__signature__</code></strong></dt>
|
||||
<dd>The signature for instantiating the model.</dd>
|
||||
<dt><strong><code>__pydantic_complete__</code></strong></dt>
|
||||
<dd>Whether model building is completed, or if there are still undefined fields.</dd>
|
||||
<dt><strong><code>__pydantic_core_schema__</code></strong></dt>
|
||||
<dd>The pydantic-core schema used to build the SchemaValidator and SchemaSerializer.</dd>
|
||||
<dt><strong><code>__pydantic_custom_init__</code></strong></dt>
|
||||
<dd>Whether the model has a custom <code>__init__</code> function.</dd>
|
||||
<dt><strong><code>__pydantic_decorators__</code></strong></dt>
|
||||
<dd>Metadata containing the decorators defined on the model.
|
||||
This replaces <code>Model.__validators__</code> and <code>Model.__root_validators__</code> from Pydantic V1.</dd>
|
||||
<dt><strong><code>__pydantic_generic_metadata__</code></strong></dt>
|
||||
<dd>Metadata for generic models; contains data used for a similar purpose to
|
||||
<strong>args</strong>, <strong>origin</strong>, <strong>parameters</strong> in typing-module generics. May eventually be replaced by these.</dd>
|
||||
<dt><strong><code>__pydantic_parent_namespace__</code></strong></dt>
|
||||
<dd>Parent namespace of the model, used for automatic rebuilding of models.</dd>
|
||||
<dt><strong><code>__pydantic_post_init__</code></strong></dt>
|
||||
<dd>The name of the post-init method for the model, if defined.</dd>
|
||||
<dt><strong><code>__pydantic_root_model__</code></strong></dt>
|
||||
<dd>Whether the model is a <code>RootModel</code>.</dd>
|
||||
<dt><strong><code>__pydantic_serializer__</code></strong></dt>
|
||||
<dd>The pydantic-core SchemaSerializer used to dump instances of the model.</dd>
|
||||
<dt><strong><code>__pydantic_validator__</code></strong></dt>
|
||||
<dd>The pydantic-core SchemaValidator used to validate instances of the model.</dd>
|
||||
<dt><strong><code>__pydantic_extra__</code></strong></dt>
|
||||
<dd>An instance attribute with the values of extra fields from validation when
|
||||
<code>model_config['extra'] == 'allow'</code>.</dd>
|
||||
<dt><strong><code>__pydantic_fields_set__</code></strong></dt>
|
||||
<dd>An instance attribute with the names of fields explicitly set.</dd>
|
||||
<dt><strong><code>__pydantic_private__</code></strong></dt>
|
||||
<dd>Instance attribute with the values of private attributes set on the model instance.</dd>
|
||||
</dl>
|
||||
<p>Create a new model by parsing and validating input data from keyword arguments.</p>
|
||||
<p>Raises [<code>ValidationError</code>][pydantic_core.ValidationError] if the input data cannot be
|
||||
validated to form a valid model.</p>
|
||||
<p><code>self</code> is explicitly positional-only to allow <code>self</code> as a field name.</p></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class TeamStructure(BaseModel):
|
||||
roles: Dict[str, RoleDetails]</code></pre>
|
||||
</details>
|
||||
<h3>Ancestors</h3>
|
||||
<ul class="hlist">
|
||||
<li>pydantic.main.BaseModel</li>
|
||||
</ul>
|
||||
<h3>Class variables</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.auto.TeamStructure.model_computed_fields"><code class="name">var <span class="ident">model_computed_fields</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TeamStructure.model_config"><code class="name">var <span class="ident">model_config</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TeamStructure.model_fields"><code class="name">var <span class="ident">model_fields</span></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.auto.TeamStructure.roles"><code class="name">var <span class="ident">roles</span> : Dict[str, <a title="praisonai.auto.RoleDetails" href="#praisonai.auto.RoleDetails">RoleDetails</a>]</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-classes">Classes</a></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.auto.AutoGenerator" href="#praisonai.auto.AutoGenerator">AutoGenerator</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.auto.AutoGenerator.convert_and_save" href="#praisonai.auto.AutoGenerator.convert_and_save">convert_and_save</a></code></li>
|
||||
<li><code><a title="praisonai.auto.AutoGenerator.generate" href="#praisonai.auto.AutoGenerator.generate">generate</a></code></li>
|
||||
<li><code><a title="praisonai.auto.AutoGenerator.get_user_content" href="#praisonai.auto.AutoGenerator.get_user_content">get_user_content</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.auto.RoleDetails" href="#praisonai.auto.RoleDetails">RoleDetails</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.auto.RoleDetails.backstory" href="#praisonai.auto.RoleDetails.backstory">backstory</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.goal" href="#praisonai.auto.RoleDetails.goal">goal</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.model_computed_fields" href="#praisonai.auto.RoleDetails.model_computed_fields">model_computed_fields</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.model_config" href="#praisonai.auto.RoleDetails.model_config">model_config</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.model_fields" href="#praisonai.auto.RoleDetails.model_fields">model_fields</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.role" href="#praisonai.auto.RoleDetails.role">role</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.tasks" href="#praisonai.auto.RoleDetails.tasks">tasks</a></code></li>
|
||||
<li><code><a title="praisonai.auto.RoleDetails.tools" href="#praisonai.auto.RoleDetails.tools">tools</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.auto.TaskDetails" href="#praisonai.auto.TaskDetails">TaskDetails</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.auto.TaskDetails.description" href="#praisonai.auto.TaskDetails.description">description</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TaskDetails.expected_output" href="#praisonai.auto.TaskDetails.expected_output">expected_output</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TaskDetails.model_computed_fields" href="#praisonai.auto.TaskDetails.model_computed_fields">model_computed_fields</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TaskDetails.model_config" href="#praisonai.auto.TaskDetails.model_config">model_config</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TaskDetails.model_fields" href="#praisonai.auto.TaskDetails.model_fields">model_fields</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.auto.TeamStructure" href="#praisonai.auto.TeamStructure">TeamStructure</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.auto.TeamStructure.model_computed_fields" href="#praisonai.auto.TeamStructure.model_computed_fields">model_computed_fields</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TeamStructure.model_config" href="#praisonai.auto.TeamStructure.model_config">model_config</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TeamStructure.model_fields" href="#praisonai.auto.TeamStructure.model_fields">model_fields</a></code></li>
|
||||
<li><code><a title="praisonai.auto.TeamStructure.roles" href="#praisonai.auto.TeamStructure.roles">roles</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,523 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.cli API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.cli</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-classes">Classes</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.cli.PraisonAI"><code class="flex name class">
|
||||
<span>class <span class="ident">PraisonAI</span></span>
|
||||
<span>(</span><span>agent_file='agents.yaml', framework='', auto=False, init=False, agent_yaml=None)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Initialize the PraisonAI object with default parameters.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>agent_file (str): The default agent file to use. Defaults to "agents.yaml".
|
||||
framework (str): The default framework to use. Defaults to "crewai".
|
||||
auto (bool): A flag indicating whether to enable auto mode. Defaults to False.
|
||||
init (bool): A flag indicating whether to enable initialization mode. Defaults to False.</p>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<dl>
|
||||
<dt><strong><code>config_list</code></strong> : <code>list</code></dt>
|
||||
<dd>A list of configuration dictionaries for the OpenAI API.</dd>
|
||||
<dt><strong><code>agent_file</code></strong> : <code>str</code></dt>
|
||||
<dd>The agent file to use.</dd>
|
||||
<dt><strong><code>framework</code></strong> : <code>str</code></dt>
|
||||
<dd>The framework to use.</dd>
|
||||
<dt><strong><code>auto</code></strong> : <code>bool</code></dt>
|
||||
<dd>A flag indicating whether to enable auto mode.</dd>
|
||||
<dt><strong><code>init</code></strong> : <code>bool</code></dt>
|
||||
<dd>A flag indicating whether to enable initialization mode.</dd>
|
||||
<dt><strong><code>agent_yaml</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The content of the YAML file. Defaults to None.</dd>
|
||||
</dl></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class PraisonAI:
|
||||
def __init__(self, agent_file="agents.yaml", framework="", auto=False, init=False, agent_yaml=None):
|
||||
"""
|
||||
Initialize the PraisonAI object with default parameters.
|
||||
|
||||
Parameters:
|
||||
agent_file (str): The default agent file to use. Defaults to "agents.yaml".
|
||||
framework (str): The default framework to use. Defaults to "crewai".
|
||||
auto (bool): A flag indicating whether to enable auto mode. Defaults to False.
|
||||
init (bool): A flag indicating whether to enable initialization mode. Defaults to False.
|
||||
|
||||
Attributes:
|
||||
config_list (list): A list of configuration dictionaries for the OpenAI API.
|
||||
agent_file (str): The agent file to use.
|
||||
framework (str): The framework to use.
|
||||
auto (bool): A flag indicating whether to enable auto mode.
|
||||
init (bool): A flag indicating whether to enable initialization mode.
|
||||
agent_yaml (str, optional): The content of the YAML file. Defaults to None.
|
||||
"""
|
||||
self.agent_yaml = agent_yaml
|
||||
self.config_list = [
|
||||
{
|
||||
'model': os.environ.get("OPENAI_MODEL_NAME", "gpt-4o"),
|
||||
'base_url': os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1"),
|
||||
'api_key': os.environ.get("OPENAI_API_KEY")
|
||||
}
|
||||
]
|
||||
self.agent_file = agent_file
|
||||
self.framework = framework
|
||||
self.auto = auto
|
||||
self.init = init
|
||||
|
||||
def run(self):
|
||||
"""
|
||||
Run the PraisonAI application.
|
||||
"""
|
||||
self.main()
|
||||
|
||||
def main(self):
|
||||
"""
|
||||
The main function of the PraisonAI object. It parses the command-line arguments,
|
||||
initializes the necessary attributes, and then calls the appropriate methods based on the
|
||||
provided arguments.
|
||||
|
||||
Args:
|
||||
self (PraisonAI): An instance of the PraisonAI class.
|
||||
|
||||
Returns:
|
||||
Any: Depending on the arguments provided, the function may return a result from the
|
||||
AgentsGenerator, a deployment result from the CloudDeployer, or a message indicating
|
||||
the successful creation of a file.
|
||||
"""
|
||||
args = self.parse_args()
|
||||
if args is None:
|
||||
agents_generator = AgentsGenerator(self.agent_file, self.framework, self.config_list)
|
||||
result = agents_generator.generate_crew_and_kickoff()
|
||||
return result
|
||||
if args.deploy:
|
||||
from .deploy import CloudDeployer
|
||||
deployer = CloudDeployer()
|
||||
deployer.run_commands()
|
||||
return
|
||||
|
||||
if getattr(args, 'chat', False):
|
||||
self.create_chainlit_chat_interface()
|
||||
return
|
||||
|
||||
if getattr(args, 'code', False):
|
||||
self.create_code_interface()
|
||||
return
|
||||
|
||||
invocation_cmd = "praisonai"
|
||||
version_string = f"PraisonAI version {__version__}"
|
||||
|
||||
self.framework = args.framework or self.framework
|
||||
|
||||
if args.agent_file:
|
||||
if args.agent_file.startswith("tests.test"): # Argument used for testing purposes. eg: python -m unittest tests.test
|
||||
print("test")
|
||||
else:
|
||||
self.agent_file = args.agent_file
|
||||
|
||||
|
||||
if args.auto or args.init:
|
||||
temp_topic = ' '.join(args.auto) if args.auto else ' '.join(args.init)
|
||||
self.topic = temp_topic
|
||||
elif self.auto or self.init: # Use the auto attribute if args.auto is not provided
|
||||
self.topic = self.auto
|
||||
|
||||
if args.auto or self.auto:
|
||||
self.agent_file = "test.yaml"
|
||||
generator = AutoGenerator(topic=self.topic , framework=self.framework, agent_file=self.agent_file)
|
||||
self.agent_file = generator.generate()
|
||||
agents_generator = AgentsGenerator(self.agent_file, self.framework, self.config_list)
|
||||
result = agents_generator.generate_crew_and_kickoff()
|
||||
return result
|
||||
elif args.init or self.init:
|
||||
self.agent_file = "agents.yaml"
|
||||
generator = AutoGenerator(topic=self.topic , framework=self.framework, agent_file=self.agent_file)
|
||||
self.agent_file = generator.generate()
|
||||
print("File {} created successfully".format(self.agent_file))
|
||||
return "File {} created successfully".format(self.agent_file)
|
||||
|
||||
if args.ui:
|
||||
if args.ui == "gradio":
|
||||
self.create_gradio_interface()
|
||||
elif args.ui == "chainlit":
|
||||
self.create_chainlit_interface()
|
||||
else:
|
||||
# Modify below code to allow default ui
|
||||
agents_generator = AgentsGenerator(self.agent_file, self.framework, self.config_list, agent_yaml=self.agent_yaml)
|
||||
result = agents_generator.generate_crew_and_kickoff()
|
||||
return result
|
||||
else:
|
||||
agents_generator = AgentsGenerator(self.agent_file, self.framework, self.config_list, agent_yaml=self.agent_yaml)
|
||||
result = agents_generator.generate_crew_and_kickoff()
|
||||
return result
|
||||
|
||||
def parse_args(self):
|
||||
"""
|
||||
Parse the command-line arguments for the PraisonAI CLI.
|
||||
|
||||
Args:
|
||||
self (PraisonAI): An instance of the PraisonAI class.
|
||||
|
||||
Returns:
|
||||
argparse.Namespace: An object containing the parsed command-line arguments.
|
||||
|
||||
Raises:
|
||||
argparse.ArgumentError: If the arguments provided are invalid.
|
||||
|
||||
Example:
|
||||
>>> args = praison_ai.parse_args()
|
||||
>>> print(args.agent_file) # Output: 'agents.yaml'
|
||||
"""
|
||||
parser = argparse.ArgumentParser(prog="praisonai", description="praisonAI command-line interface")
|
||||
parser.add_argument("--framework", choices=["crewai", "autogen"], help="Specify the framework")
|
||||
parser.add_argument("--ui", choices=["chainlit", "gradio"], help="Specify the UI framework (gradio or chainlit).")
|
||||
parser.add_argument("--auto", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
|
||||
parser.add_argument("--init", nargs=argparse.REMAINDER, help="Enable auto mode and pass arguments for it")
|
||||
parser.add_argument("agent_file", nargs="?", help="Specify the agent file")
|
||||
parser.add_argument("--deploy", action="store_true", help="Deploy the application") # New argument
|
||||
args, unknown_args = parser.parse_known_args()
|
||||
|
||||
if unknown_args and unknown_args[0] == '-b' and unknown_args[1] == 'api:app':
|
||||
args.agent_file = 'agents.yaml'
|
||||
if args.agent_file == 'api:app' or args.agent_file == '/app/api:app':
|
||||
args.agent_file = 'agents.yaml'
|
||||
if args.agent_file == 'ui':
|
||||
args.ui = 'chainlit'
|
||||
if args.agent_file == 'chat':
|
||||
args.ui = 'chainlit'
|
||||
args.chat = True
|
||||
if args.agent_file == 'code':
|
||||
args.ui = 'chainlit'
|
||||
args.code = True
|
||||
|
||||
return args
|
||||
|
||||
def create_chainlit_chat_interface(self):
|
||||
"""
|
||||
Create a Chainlit interface for the chat application.
|
||||
|
||||
This function sets up a Chainlit application that listens for messages.
|
||||
When a message is received, it runs PraisonAI with the provided message as the topic.
|
||||
The generated agents are then used to perform tasks.
|
||||
|
||||
Returns:
|
||||
None: This function does not return any value. It starts the Chainlit application.
|
||||
"""
|
||||
if CHAINLIT_AVAILABLE:
|
||||
import praisonai
|
||||
os.environ["CHAINLIT_PORT"] = "8084"
|
||||
public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
|
||||
if not os.path.exists("public"): # Check if the folder exists in the current directory
|
||||
if os.path.exists(public_folder):
|
||||
shutil.copytree(public_folder, 'public', dirs_exist_ok=True)
|
||||
logging.info("Public folder copied successfully!")
|
||||
else:
|
||||
logging.info("Public folder not found in the package.")
|
||||
else:
|
||||
logging.info("Public folder already exists.")
|
||||
chat_ui_path = os.path.join(os.path.dirname(praisonai.__file__), 'ui', 'chat.py')
|
||||
chainlit_run([chat_ui_path])
|
||||
else:
|
||||
print("ERROR: Chat UI is not installed. Please install it with 'pip install \"praisonai\[chat]\"' to use the chat UI.")
|
||||
|
||||
def create_code_interface(self):
|
||||
"""
|
||||
Create a Chainlit interface for the code application.
|
||||
|
||||
This function sets up a Chainlit application that listens for messages.
|
||||
When a message is received, it runs PraisonAI with the provided message as the topic.
|
||||
The generated agents are then used to perform tasks.
|
||||
|
||||
Returns:
|
||||
None: This function does not return any value. It starts the Chainlit application.
|
||||
"""
|
||||
if CHAINLIT_AVAILABLE:
|
||||
import praisonai
|
||||
os.environ["CHAINLIT_PORT"] = "8086"
|
||||
public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
|
||||
if not os.path.exists("public"): # Check if the folder exists in the current directory
|
||||
if os.path.exists(public_folder):
|
||||
shutil.copytree(public_folder, 'public', dirs_exist_ok=True)
|
||||
logging.info("Public folder copied successfully!")
|
||||
else:
|
||||
logging.info("Public folder not found in the package.")
|
||||
else:
|
||||
logging.info("Public folder already exists.")
|
||||
code_ui_path = os.path.join(os.path.dirname(praisonai.__file__), 'ui', 'code.py')
|
||||
chainlit_run([code_ui_path])
|
||||
else:
|
||||
print("ERROR: Code UI is not installed. Please install it with 'pip install \"praisonai\[code]\"' to use the code UI.")
|
||||
|
||||
def create_gradio_interface(self):
|
||||
"""
|
||||
Create a Gradio interface for generating agents and performing tasks.
|
||||
|
||||
Args:
|
||||
self (PraisonAI): An instance of the PraisonAI class.
|
||||
|
||||
Returns:
|
||||
None: This method does not return any value. It launches the Gradio interface.
|
||||
|
||||
Raises:
|
||||
None: This method does not raise any exceptions.
|
||||
|
||||
Example:
|
||||
>>> praison_ai.create_gradio_interface()
|
||||
"""
|
||||
if GRADIO_AVAILABLE:
|
||||
def generate_crew_and_kickoff_interface(auto_args, framework):
|
||||
"""
|
||||
Generate a crew and kick off tasks based on the provided auto arguments and framework.
|
||||
|
||||
Args:
|
||||
auto_args (list): Topic.
|
||||
framework (str): The framework to use for generating agents.
|
||||
|
||||
Returns:
|
||||
str: A string representing the result of generating the crew and kicking off tasks.
|
||||
|
||||
Raises:
|
||||
None: This method does not raise any exceptions.
|
||||
|
||||
Example:
|
||||
>>> result = generate_crew_and_kickoff_interface("Create a movie about Cat in Mars", "crewai")
|
||||
>>> print(result)
|
||||
"""
|
||||
self.framework = framework
|
||||
self.agent_file = "test.yaml"
|
||||
generator = AutoGenerator(topic=auto_args , framework=self.framework)
|
||||
self.agent_file = generator.generate()
|
||||
agents_generator = AgentsGenerator(self.agent_file, self.framework, self.config_list)
|
||||
result = agents_generator.generate_crew_and_kickoff()
|
||||
return result
|
||||
|
||||
gr.Interface(
|
||||
fn=generate_crew_and_kickoff_interface,
|
||||
inputs=[gr.Textbox(lines=2, label="Auto Args"), gr.Dropdown(choices=["crewai", "autogen"], label="Framework")],
|
||||
outputs="textbox",
|
||||
title="Praison AI Studio",
|
||||
description="Create Agents and perform tasks",
|
||||
theme="default"
|
||||
).launch()
|
||||
else:
|
||||
print("ERROR: Gradio is not installed. Please install it with 'pip install gradio' to use this feature.")
|
||||
|
||||
def create_chainlit_interface(self):
|
||||
"""
|
||||
Create a Chainlit interface for generating agents and performing tasks.
|
||||
|
||||
This function sets up a Chainlit application that listens for messages.
|
||||
When a message is received, it runs PraisonAI with the provided message as the topic.
|
||||
The generated agents are then used to perform tasks.
|
||||
|
||||
Returns:
|
||||
None: This function does not return any value. It starts the Chainlit application.
|
||||
"""
|
||||
if CHAINLIT_AVAILABLE:
|
||||
import praisonai
|
||||
os.environ["CHAINLIT_PORT"] = "8082"
|
||||
# Get the path to the 'public' folder within the package
|
||||
public_folder = os.path.join(os.path.dirname(praisonai.__file__), 'public')
|
||||
if not os.path.exists("public"): # Check if the folder exists in the current directory
|
||||
if os.path.exists(public_folder):
|
||||
shutil.copytree(public_folder, 'public', dirs_exist_ok=True)
|
||||
logging.info("Public folder copied successfully!")
|
||||
else:
|
||||
logging.info("Public folder not found in the package.")
|
||||
else:
|
||||
logging.info("Public folder already exists.")
|
||||
chainlit_ui_path = os.path.join(os.path.dirname(praisonai.__file__), 'chainlit_ui.py')
|
||||
chainlit_run([chainlit_ui_path])
|
||||
else:
|
||||
print("ERROR: Chainlit is not installed. Please install it with 'pip install \"praisonai\[ui]\"' to use the UI.") </code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.cli.PraisonAI.create_chainlit_chat_interface"><code class="name flex">
|
||||
<span>def <span class="ident">create_chainlit_chat_interface</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Create a Chainlit interface for the chat application.</p>
|
||||
<p>This function sets up a Chainlit application that listens for messages.
|
||||
When a message is received, it runs PraisonAI with the provided message as the topic.
|
||||
The generated agents are then used to perform tasks.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>None</code></dt>
|
||||
<dd>This function does not return any value. It starts the Chainlit application.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.cli.PraisonAI.create_chainlit_interface"><code class="name flex">
|
||||
<span>def <span class="ident">create_chainlit_interface</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Create a Chainlit interface for generating agents and performing tasks.</p>
|
||||
<p>This function sets up a Chainlit application that listens for messages.
|
||||
When a message is received, it runs PraisonAI with the provided message as the topic.
|
||||
The generated agents are then used to perform tasks.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>None</code></dt>
|
||||
<dd>This function does not return any value. It starts the Chainlit application.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.cli.PraisonAI.create_code_interface"><code class="name flex">
|
||||
<span>def <span class="ident">create_code_interface</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Create a Chainlit interface for the code application.</p>
|
||||
<p>This function sets up a Chainlit application that listens for messages.
|
||||
When a message is received, it runs PraisonAI with the provided message as the topic.
|
||||
The generated agents are then used to perform tasks.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>None</code></dt>
|
||||
<dd>This function does not return any value. It starts the Chainlit application.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
<dt id="praisonai.cli.PraisonAI.create_gradio_interface"><code class="name flex">
|
||||
<span>def <span class="ident">create_gradio_interface</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Create a Gradio interface for generating agents and performing tasks.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<dl>
|
||||
<dt><strong><code>self</code></strong> : <code><a title="praisonai.cli.PraisonAI" href="#praisonai.cli.PraisonAI">PraisonAI</a></code></dt>
|
||||
<dd>An instance of the PraisonAI class.</dd>
|
||||
</dl>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>None</code></dt>
|
||||
<dd>This method does not return any value. It launches the Gradio interface.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>None</code></dt>
|
||||
<dd>This method does not raise any exceptions.</dd>
|
||||
</dl>
|
||||
<h2 id="example">Example</h2>
|
||||
<pre><code class="language-python-repl">>>> praison_ai.create_gradio_interface()
|
||||
</code></pre></div>
|
||||
</dd>
|
||||
<dt id="praisonai.cli.PraisonAI.main"><code class="name flex">
|
||||
<span>def <span class="ident">main</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>The main function of the PraisonAI object. It parses the command-line arguments,
|
||||
initializes the necessary attributes, and then calls the appropriate methods based on the
|
||||
provided arguments.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<dl>
|
||||
<dt><strong><code>self</code></strong> : <code><a title="praisonai.cli.PraisonAI" href="#praisonai.cli.PraisonAI">PraisonAI</a></code></dt>
|
||||
<dd>An instance of the PraisonAI class.</dd>
|
||||
</dl>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>Any</code></dt>
|
||||
<dd>Depending on the arguments provided, the function may return a result from the</dd>
|
||||
</dl>
|
||||
<p>AgentsGenerator, a deployment result from the CloudDeployer, or a message indicating
|
||||
the successful creation of a file.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.cli.PraisonAI.parse_args"><code class="name flex">
|
||||
<span>def <span class="ident">parse_args</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Parse the command-line arguments for the PraisonAI CLI.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<dl>
|
||||
<dt><strong><code>self</code></strong> : <code><a title="praisonai.cli.PraisonAI" href="#praisonai.cli.PraisonAI">PraisonAI</a></code></dt>
|
||||
<dd>An instance of the PraisonAI class.</dd>
|
||||
</dl>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>argparse.Namespace</code></dt>
|
||||
<dd>An object containing the parsed command-line arguments.</dd>
|
||||
</dl>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<dl>
|
||||
<dt><code>argparse.ArgumentError</code></dt>
|
||||
<dd>If the arguments provided are invalid.</dd>
|
||||
</dl>
|
||||
<h2 id="example">Example</h2>
|
||||
<pre><code class="language-python-repl">>>> args = praison_ai.parse_args()
|
||||
>>> print(args.agent_file) # Output: 'agents.yaml'
|
||||
</code></pre></div>
|
||||
</dd>
|
||||
<dt id="praisonai.cli.PraisonAI.run"><code class="name flex">
|
||||
<span>def <span class="ident">run</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Run the PraisonAI application.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-classes">Classes</a></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.cli.PraisonAI" href="#praisonai.cli.PraisonAI">PraisonAI</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.cli.PraisonAI.create_chainlit_chat_interface" href="#praisonai.cli.PraisonAI.create_chainlit_chat_interface">create_chainlit_chat_interface</a></code></li>
|
||||
<li><code><a title="praisonai.cli.PraisonAI.create_chainlit_interface" href="#praisonai.cli.PraisonAI.create_chainlit_interface">create_chainlit_interface</a></code></li>
|
||||
<li><code><a title="praisonai.cli.PraisonAI.create_code_interface" href="#praisonai.cli.PraisonAI.create_code_interface">create_code_interface</a></code></li>
|
||||
<li><code><a title="praisonai.cli.PraisonAI.create_gradio_interface" href="#praisonai.cli.PraisonAI.create_gradio_interface">create_gradio_interface</a></code></li>
|
||||
<li><code><a title="praisonai.cli.PraisonAI.main" href="#praisonai.cli.PraisonAI.main">main</a></code></li>
|
||||
<li><code><a title="praisonai.cli.PraisonAI.parse_args" href="#praisonai.cli.PraisonAI.parse_args">parse_args</a></code></li>
|
||||
<li><code><a title="praisonai.cli.PraisonAI.run" href="#praisonai.cli.PraisonAI.run">run</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,279 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.deploy API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.deploy</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-classes">Classes</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.deploy.CloudDeployer"><code class="flex name class">
|
||||
<span>class <span class="ident">CloudDeployer</span></span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>A class for deploying a cloud-based application.</p>
|
||||
<h2 id="attributes">Attributes</h2>
|
||||
<p>None</p>
|
||||
<h2 id="methods">Methods</h2>
|
||||
<p><strong>init</strong>(self):
|
||||
Loads environment variables from .env file or system and sets them.</p>
|
||||
<p>Loads environment variables from .env file or system and sets them.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>self: An instance of the CloudDeployer class.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<p>None</p>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<p>None</p></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class CloudDeployer:
|
||||
"""
|
||||
A class for deploying a cloud-based application.
|
||||
|
||||
Attributes:
|
||||
None
|
||||
|
||||
Methods:
|
||||
__init__(self):
|
||||
Loads environment variables from .env file or system and sets them.
|
||||
|
||||
"""
|
||||
def __init__(self):
|
||||
"""
|
||||
Loads environment variables from .env file or system and sets them.
|
||||
|
||||
Parameters:
|
||||
self: An instance of the CloudDeployer class.
|
||||
|
||||
Returns:
|
||||
None
|
||||
|
||||
Raises:
|
||||
None
|
||||
|
||||
"""
|
||||
# Load environment variables from .env file or system
|
||||
load_dotenv()
|
||||
self.set_environment_variables()
|
||||
|
||||
def create_dockerfile(self):
|
||||
"""
|
||||
Creates a Dockerfile for the application.
|
||||
|
||||
Parameters:
|
||||
self: An instance of the CloudDeployer class.
|
||||
|
||||
Returns:
|
||||
None
|
||||
|
||||
Raises:
|
||||
None
|
||||
|
||||
This method creates a Dockerfile in the current directory with the specified content.
|
||||
The Dockerfile is used to build a Docker image for the application.
|
||||
The content of the Dockerfile includes instructions to use the Python 3.11-slim base image,
|
||||
set the working directory to /app, copy the current directory contents into the container,
|
||||
install the required Python packages (flask, praisonai, gunicorn, and markdown),
|
||||
expose port 8080, and run the application using Gunicorn.
|
||||
"""
|
||||
with open("Dockerfile", "w") as file:
|
||||
file.write("FROM python:3.11-slim\n")
|
||||
file.write("WORKDIR /app\n")
|
||||
file.write("COPY . .\n")
|
||||
file.write("RUN pip install flask praisonai==0.0.57 gunicorn markdown\n")
|
||||
file.write("EXPOSE 8080\n")
|
||||
file.write('CMD ["gunicorn", "-b", "0.0.0.0:8080", "api:app"]\n')
|
||||
|
||||
def create_api_file(self):
|
||||
"""
|
||||
Creates an API file for the application.
|
||||
|
||||
Parameters:
|
||||
self (CloudDeployer): An instance of the CloudDeployer class.
|
||||
|
||||
Returns:
|
||||
None
|
||||
|
||||
This method creates an API file named "api.py" in the current directory. The file contains a basic Flask application that uses the PraisonAI library to run a simple agent and returns the output as an HTML page. The application listens on the root path ("/") and uses the Markdown library to format the output.
|
||||
"""
|
||||
with open("api.py", "w") as file:
|
||||
file.write("from flask import Flask\n")
|
||||
file.write("from praisonai import PraisonAI\n")
|
||||
file.write("import markdown\n\n")
|
||||
file.write("app = Flask(__name__)\n\n")
|
||||
file.write("def basic():\n")
|
||||
file.write(" praisonai = PraisonAI(agent_file=\"agents.yaml\")\n")
|
||||
file.write(" return praisonai.run()\n\n")
|
||||
file.write("@app.route('/')\n")
|
||||
file.write("def home():\n")
|
||||
file.write(" output = basic()\n")
|
||||
file.write(" html_output = markdown.markdown(output)\n")
|
||||
file.write(" return f'<html><body>{html_output}</body></html>'\n\n")
|
||||
file.write("if __name__ == \"__main__\":\n")
|
||||
file.write(" app.run(debug=True)\n")
|
||||
|
||||
def set_environment_variables(self):
|
||||
"""Sets environment variables with fallback to .env values or defaults."""
|
||||
os.environ["OPENAI_MODEL_NAME"] = os.getenv("OPENAI_MODEL_NAME", "gpt-4o")
|
||||
os.environ["OPENAI_API_KEY"] = os.getenv("OPENAI_API_KEY", "Enter your API key")
|
||||
os.environ["OPENAI_API_BASE"] = os.getenv("OPENAI_API_BASE", "https://api.openai.com/v1")
|
||||
|
||||
def run_commands(self):
|
||||
"""
|
||||
Sets environment variables with fallback to .env values or defaults.
|
||||
|
||||
Parameters:
|
||||
None
|
||||
|
||||
Returns:
|
||||
None
|
||||
|
||||
Raises:
|
||||
None
|
||||
|
||||
This method sets environment variables for the application. It uses the `os.environ` dictionary to set the following environment variables:
|
||||
|
||||
- `OPENAI_MODEL_NAME`: The name of the OpenAI model to use. If not specified in the .env file, it defaults to "gpt-4o".
|
||||
- `OPENAI_API_KEY`: The API key for accessing the OpenAI API. If not specified in the .env file, it defaults to "Enter your API key".
|
||||
- `OPENAI_API_BASE`: The base URL for the OpenAI API. If not specified in the .env file, it defaults to "https://api.openai.com/v1".
|
||||
"""
|
||||
self.create_api_file()
|
||||
self.create_dockerfile()
|
||||
"""Runs a sequence of shell commands for deployment, continues on error."""
|
||||
commands = [
|
||||
"yes | gcloud auth configure-docker us-central1-docker.pkg.dev",
|
||||
"gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1",
|
||||
"docker build --platform linux/amd64 -t gcr.io/$(gcloud config get-value project)/praisonai-app:latest .",
|
||||
"docker tag gcr.io/$(gcloud config get-value project)/praisonai-app:latest us-central1-docker.pkg.dev/$(gcloud config get-value project)/praisonai-repository/praisonai-app:latest",
|
||||
"docker push us-central1-docker.pkg.dev/$(gcloud config get-value project)/praisonai-repository/praisonai-app:latest",
|
||||
"gcloud run deploy praisonai-service --image us-central1-docker.pkg.dev/$(gcloud config get-value project)/praisonai-repository/praisonai-app:latest --platform managed --region us-central1 --allow-unauthenticated --set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}"
|
||||
]
|
||||
|
||||
for cmd in commands:
|
||||
try:
|
||||
subprocess.run(cmd, shell=True, check=True)
|
||||
except subprocess.CalledProcessError as e:
|
||||
print(f"ERROR: Command '{e.cmd}' failed with exit status {e.returncode}")
|
||||
print(f"Continuing with the next command...")</code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.deploy.CloudDeployer.create_api_file"><code class="name flex">
|
||||
<span>def <span class="ident">create_api_file</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Creates an API file for the application.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>self (CloudDeployer): An instance of the CloudDeployer class.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<p>None
|
||||
This method creates an API file named "api.py" in the current directory. The file contains a basic Flask application that uses the PraisonAI library to run a simple agent and returns the output as an HTML page. The application listens on the root path ("/") and uses the Markdown library to format the output.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.deploy.CloudDeployer.create_dockerfile"><code class="name flex">
|
||||
<span>def <span class="ident">create_dockerfile</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Creates a Dockerfile for the application.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>self: An instance of the CloudDeployer class.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<p>None</p>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<p>None
|
||||
This method creates a Dockerfile in the current directory with the specified content.
|
||||
The Dockerfile is used to build a Docker image for the application.
|
||||
The content of the Dockerfile includes instructions to use the Python 3.11-slim base image,
|
||||
set the working directory to /app, copy the current directory contents into the container,
|
||||
install the required Python packages (flask, praisonai, gunicorn, and markdown),
|
||||
expose port 8080, and run the application using Gunicorn.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.deploy.CloudDeployer.run_commands"><code class="name flex">
|
||||
<span>def <span class="ident">run_commands</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Sets environment variables with fallback to .env values or defaults.</p>
|
||||
<h2 id="parameters">Parameters</h2>
|
||||
<p>None</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<p>None</p>
|
||||
<h2 id="raises">Raises</h2>
|
||||
<p>None
|
||||
This method sets environment variables for the application. It uses the <code>os.environ</code> dictionary to set the following environment variables:</p>
|
||||
<ul>
|
||||
<li><code>OPENAI_MODEL_NAME</code>: The name of the OpenAI model to use. If not specified in the .env file, it defaults to "gpt-4o".</li>
|
||||
<li><code>OPENAI_API_KEY</code>: The API key for accessing the OpenAI API. If not specified in the .env file, it defaults to "Enter your API key".</li>
|
||||
<li><code>OPENAI_API_BASE</code>: The base URL for the OpenAI API. If not specified in the .env file, it defaults to "https://api.openai.com/v1".</li>
|
||||
</ul></div>
|
||||
</dd>
|
||||
<dt id="praisonai.deploy.CloudDeployer.set_environment_variables"><code class="name flex">
|
||||
<span>def <span class="ident">set_environment_variables</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Sets environment variables with fallback to .env values or defaults.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-classes">Classes</a></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.deploy.CloudDeployer" href="#praisonai.deploy.CloudDeployer">CloudDeployer</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.deploy.CloudDeployer.create_api_file" href="#praisonai.deploy.CloudDeployer.create_api_file">create_api_file</a></code></li>
|
||||
<li><code><a title="praisonai.deploy.CloudDeployer.create_dockerfile" href="#praisonai.deploy.CloudDeployer.create_dockerfile">create_dockerfile</a></code></li>
|
||||
<li><code><a title="praisonai.deploy.CloudDeployer.run_commands" href="#praisonai.deploy.CloudDeployer.run_commands">run_commands</a></code></li>
|
||||
<li><code><a title="praisonai.deploy.CloudDeployer.set_environment_variables" href="#praisonai.deploy.CloudDeployer.set_environment_variables">set_environment_variables</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,188 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.inbuilt_tools.autogen_tools API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.inbuilt_tools.autogen_tools</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-functions">Functions</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_CSVSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_CSVSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_CodeDocsSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_CodeDocsSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_DOCXSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_DOCXSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_DirectoryReadTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_DirectoryReadTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_DirectorySearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_DirectorySearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_FileReadTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_FileReadTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_JSONSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_JSONSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_MDXSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_MDXSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_PDFSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_PDFSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_RagTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_RagTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_ScrapeElementFromWebsiteTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_ScrapeElementFromWebsiteTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_ScrapeWebsiteTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_ScrapeWebsiteTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_TXTSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_TXTSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_WebsiteSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_WebsiteSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_XMLSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_XMLSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_YoutubeChannelSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_YoutubeChannelSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.autogen_YoutubeVideoSearchTool"><code class="name flex">
|
||||
<span>def <span class="ident">autogen_YoutubeVideoSearchTool</span></span>(<span>assistant, user_proxy)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.inbuilt_tools.autogen_tools.create_autogen_tool_function"><code class="name flex">
|
||||
<span>def <span class="ident">create_autogen_tool_function</span></span>(<span>tool_name)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.inbuilt_tools" href="index.html">praisonai.inbuilt_tools</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-functions">Functions</a></h3>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_CSVSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_CSVSearchTool">autogen_CSVSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_CodeDocsSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_CodeDocsSearchTool">autogen_CodeDocsSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_DOCXSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_DOCXSearchTool">autogen_DOCXSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_DirectoryReadTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_DirectoryReadTool">autogen_DirectoryReadTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_DirectorySearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_DirectorySearchTool">autogen_DirectorySearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_FileReadTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_FileReadTool">autogen_FileReadTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_JSONSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_JSONSearchTool">autogen_JSONSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_MDXSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_MDXSearchTool">autogen_MDXSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_PDFSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_PDFSearchTool">autogen_PDFSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_RagTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_RagTool">autogen_RagTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_ScrapeElementFromWebsiteTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_ScrapeElementFromWebsiteTool">autogen_ScrapeElementFromWebsiteTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_ScrapeWebsiteTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_ScrapeWebsiteTool">autogen_ScrapeWebsiteTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_TXTSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_TXTSearchTool">autogen_TXTSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_WebsiteSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_WebsiteSearchTool">autogen_WebsiteSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_XMLSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_XMLSearchTool">autogen_XMLSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_YoutubeChannelSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_YoutubeChannelSearchTool">autogen_YoutubeChannelSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.autogen_YoutubeVideoSearchTool" href="#praisonai.inbuilt_tools.autogen_tools.autogen_YoutubeVideoSearchTool">autogen_YoutubeVideoSearchTool</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools.create_autogen_tool_function" href="#praisonai.inbuilt_tools.autogen_tools.create_autogen_tool_function">create_autogen_tool_function</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,67 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.inbuilt_tools API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.inbuilt_tools</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-submodules">Sub-modules</h2>
|
||||
<dl>
|
||||
<dt><code class="name"><a title="praisonai.inbuilt_tools.autogen_tools" href="autogen_tools.html">praisonai.inbuilt_tools.autogen_tools</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="../index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-submodules">Sub-modules</a></h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.inbuilt_tools.autogen_tools" href="autogen_tools.html">praisonai.inbuilt_tools.autogen_tools</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,67 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.inc API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.inc</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-submodules">Sub-modules</h2>
|
||||
<dl>
|
||||
<dt><code class="name"><a title="praisonai.inc.models" href="models.html">praisonai.inc.models</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="../index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-submodules">Sub-modules</a></h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.inc.models" href="models.html">praisonai.inc.models</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,200 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.inc.models API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.inc.models</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-classes">Classes</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.inc.models.PraisonAIModel"><code class="flex name class">
|
||||
<span>class <span class="ident">PraisonAIModel</span></span>
|
||||
<span>(</span><span>model=None, api_key_var=None, base_url=None)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Initializes the PraisonAIModel with the provided parameters or environment variables.</p>
|
||||
<h2 id="args">Args</h2>
|
||||
<dl>
|
||||
<dt><strong><code>model</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The name of the OpenAI model. Defaults to None.</dd>
|
||||
<dt><strong><code>api_key_var</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The OpenAI API key. Defaults to None.</dd>
|
||||
<dt><strong><code>base_url</code></strong> : <code>str</code>, optional</dt>
|
||||
<dd>The base URL for the OpenAI API. Defaults to None.</dd>
|
||||
</dl></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class PraisonAIModel:
|
||||
def __init__(self, model=None, api_key_var=None, base_url=None):
|
||||
"""
|
||||
Initializes the PraisonAIModel with the provided parameters or environment variables.
|
||||
|
||||
Args:
|
||||
model (str, optional): The name of the OpenAI model. Defaults to None.
|
||||
api_key_var (str, optional): The OpenAI API key. Defaults to None.
|
||||
base_url (str, optional): The base URL for the OpenAI API. Defaults to None.
|
||||
"""
|
||||
self.model = model or os.getenv("OPENAI_MODEL_NAME", "gpt-4o")
|
||||
if self.model.startswith("openai/"):
|
||||
self.api_key_var = "OPENAI_API_KEY"
|
||||
self.base_url = base_url or "https://api.openai.com/v1"
|
||||
self.model_name = self.model.replace("openai/", "")
|
||||
elif self.model.startswith("groq/"):
|
||||
self.api_key_var = "GROQ_API_KEY"
|
||||
self.base_url = base_url or "https://api.groq.com/openai/v1"
|
||||
self.model_name = self.model.replace("groq/", "")
|
||||
elif self.model.startswith("cohere/"):
|
||||
self.api_key_var = "COHERE_API_KEY"
|
||||
self.base_url = ""
|
||||
self.model_name = self.model.replace("cohere/", "")
|
||||
elif self.model.startswith("ollama/"):
|
||||
self.api_key_var = "OLLAMA_API_KEY"
|
||||
self.base_url = base_url or "http://localhost:11434/v1"
|
||||
self.model_name = self.model.replace("ollama/", "")
|
||||
elif self.model.startswith("anthropic/"):
|
||||
self.api_key_var = "ANTHROPIC_API_KEY"
|
||||
self.base_url = ""
|
||||
self.model_name = self.model.replace("anthropic/", "")
|
||||
elif self.model.startswith("google/"):
|
||||
self.api_key_var = "GOOGLE_API_KEY"
|
||||
self.base_url = ""
|
||||
self.model_name = self.model.replace("google/", "")
|
||||
elif self.model.startswith("openrouter/"):
|
||||
self.api_key_var = "OPENROUTER_API_KEY"
|
||||
self.base_url = base_url or "https://openrouter.ai/api/v1"
|
||||
self.model_name = self.model.replace("openrouter/", "")
|
||||
else:
|
||||
self.api_key_var = api_key_var or "OPENAI_API_KEY"
|
||||
self.base_url = base_url or os.environ.get("OPENAI_API_BASE", "https://api.openai.com/v1")
|
||||
self.model_name = self.model
|
||||
logger.debug(f"Initialized PraisonAIModel with model {self.model_name}, api_key_var {self.api_key_var}, and base_url {self.base_url}")
|
||||
self.api_key = os.environ.get(self.api_key_var, "nokey")
|
||||
|
||||
def get_model(self):
|
||||
"""
|
||||
Returns an instance of the langchain Chat client with the configured parameters.
|
||||
|
||||
Returns:
|
||||
Chat: An instance of the langchain Chat client.
|
||||
"""
|
||||
if self.model.startswith("google/"):
|
||||
if GOOGLE_GENAI_AVAILABLE:
|
||||
return ChatGoogleGenerativeAI(
|
||||
model=self.model_name,
|
||||
google_api_key=self.api_key
|
||||
)
|
||||
else:
|
||||
raise ImportError(
|
||||
"Required Langchain Integration 'langchain-google-genai' not found. "
|
||||
"Please install with 'pip install langchain-google-genai'"
|
||||
)
|
||||
elif self.model.startswith("cohere/"):
|
||||
if COHERE_AVAILABLE:
|
||||
return ChatCohere(
|
||||
model=self.model_name,
|
||||
cohere_api_key=self.api_key,
|
||||
)
|
||||
else:
|
||||
raise ImportError(
|
||||
"Required Langchain Integration 'langchain-cohere' not found. "
|
||||
"Please install with 'pip install langchain-cohere'"
|
||||
)
|
||||
elif self.model.startswith("anthropic/"):
|
||||
if ANTHROPIC_AVAILABLE:
|
||||
return ChatAnthropic(
|
||||
model=self.model_name,
|
||||
anthropic_api_key=self.api_key,
|
||||
)
|
||||
else:
|
||||
raise ImportError(
|
||||
"Required Langchain Integration 'langchain-anthropic' not found. "
|
||||
"Please install with 'pip install langchain-anthropic'"
|
||||
)
|
||||
elif OPENAI_AVAILABLE:
|
||||
return ChatOpenAI(
|
||||
model=self.model_name,
|
||||
api_key=self.api_key,
|
||||
base_url=self.base_url,
|
||||
)
|
||||
else:
|
||||
raise ImportError(
|
||||
"Required Langchain Integration 'langchain-openai' not found. "
|
||||
"Please install with 'pip install langchain-openai'"
|
||||
)</code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.inc.models.PraisonAIModel.get_model"><code class="name flex">
|
||||
<span>def <span class="ident">get_model</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Returns an instance of the langchain Chat client with the configured parameters.</p>
|
||||
<h2 id="returns">Returns</h2>
|
||||
<dl>
|
||||
<dt><code>Chat</code></dt>
|
||||
<dd>An instance of the langchain Chat client.</dd>
|
||||
</dl></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.inc" href="index.html">praisonai.inc</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-classes">Classes</a></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.inc.models.PraisonAIModel" href="#praisonai.inc.models.PraisonAIModel">PraisonAIModel</a></code></h4>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.inc.models.PraisonAIModel.get_model" href="#praisonai.inc.models.PraisonAIModel.get_model">get_model</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,102 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Package <code>praisonai</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-submodules">Sub-modules</h2>
|
||||
<dl>
|
||||
<dt><code class="name"><a title="praisonai.agents_generator" href="agents_generator.html">praisonai.agents_generator</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.auto" href="auto.html">praisonai.auto</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.cli" href="cli.html">praisonai.cli</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.deploy" href="deploy.html">praisonai.deploy</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.inbuilt_tools" href="inbuilt_tools/index.html">praisonai.inbuilt_tools</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.inc" href="inc/index.html">praisonai.inc</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.test" href="test.html">praisonai.test</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.ui" href="ui/index.html">praisonai.ui</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt><code class="name"><a title="praisonai.version" href="version.html">praisonai.version</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3><a href="#header-submodules">Sub-modules</a></h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.agents_generator" href="agents_generator.html">praisonai.agents_generator</a></code></li>
|
||||
<li><code><a title="praisonai.auto" href="auto.html">praisonai.auto</a></code></li>
|
||||
<li><code><a title="praisonai.cli" href="cli.html">praisonai.cli</a></code></li>
|
||||
<li><code><a title="praisonai.deploy" href="deploy.html">praisonai.deploy</a></code></li>
|
||||
<li><code><a title="praisonai.inbuilt_tools" href="inbuilt_tools/index.html">praisonai.inbuilt_tools</a></code></li>
|
||||
<li><code><a title="praisonai.inc" href="inc/index.html">praisonai.inc</a></code></li>
|
||||
<li><code><a title="praisonai.test" href="test.html">praisonai.test</a></code></li>
|
||||
<li><code><a title="praisonai.ui" href="ui/index.html">praisonai.ui</a></code></li>
|
||||
<li><code><a title="praisonai.version" href="version.html">praisonai.version</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.test API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.test</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-functions">Functions</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.test.generate_crew_and_kickoff"><code class="name flex">
|
||||
<span>def <span class="ident">generate_crew_and_kickoff</span></span>(<span>agent_file)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>This function generates a crew of agents and kicks off tasks based on the configuration provided in a YAML file.</p>
|
||||
<p>Parameters:
|
||||
agent_file (str): The path to the YAML file containing the configuration for the agents and tasks.</p>
|
||||
<p>Returns:
|
||||
str: The result of the last task executed by the crew.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-functions">Functions</a></h3>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.test.generate_crew_and_kickoff" href="#praisonai.test.generate_crew_and_kickoff">generate_crew_and_kickoff</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,388 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.ui.context API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.ui.context</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-functions">Functions</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.ui.context.main"><code class="name flex">
|
||||
<span>def <span class="ident">main</span></span>(<span>)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-classes">Classes</h2>
|
||||
<dl>
|
||||
<dt id="praisonai.ui.context.ContextGatherer"><code class="flex name class">
|
||||
<span>class <span class="ident">ContextGatherer</span></span>
|
||||
<span>(</span><span>directory='.', output_file='context.txt', relevant_extensions=None, max_file_size=1000000, max_tokens=900000)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
<details class="source">
|
||||
<summary>
|
||||
<span>Expand source code</span>
|
||||
</summary>
|
||||
<pre><code class="python">class ContextGatherer:
|
||||
def __init__(self, directory='.', output_file='context.txt',
|
||||
relevant_extensions=None, max_file_size=1_000_000, max_tokens=900000):
|
||||
self.directory = directory
|
||||
self.output_file = output_file
|
||||
self.relevant_extensions = relevant_extensions or [
|
||||
'.py', '.js', '.ts', '.java', '.rb', '.php', '.pl', '.pm', '.c', '.h',
|
||||
'.cpp', '.hpp', '.cs', '.vb', '.swift', '.kt', '.m', '.mm', '.go', '.rs',
|
||||
'.hs', '.r', '.lua', '.sh', '.bat', '.clj', '.scala', '.erl', '.ex',
|
||||
'.ml', '.fs', '.groovy', '.jsm', '.jsx', '.tsx', '.yaml'
|
||||
]
|
||||
self.max_file_size = max_file_size
|
||||
self.max_tokens = int(os.getenv("PRAISONAI_MAX_TOKENS", max_tokens))
|
||||
self.ignore_patterns = self.get_ignore_patterns()
|
||||
self.include_paths = self.get_include_paths()
|
||||
self.included_files = []
|
||||
|
||||
def get_ignore_patterns(self):
|
||||
"""
|
||||
Loads ignore patterns from various sources, prioritizing them in
|
||||
the following order:
|
||||
1. .praisonignore
|
||||
2. settings.yaml (under code.ignore_files)
|
||||
3. PRAISONAI_IGNORE_FILES environment variable
|
||||
4. .gitignore
|
||||
5. Default patterns
|
||||
"""
|
||||
ignore_patterns = []
|
||||
|
||||
def load_from_file(filepath):
|
||||
if os.path.exists(filepath):
|
||||
with open(filepath, 'r') as f:
|
||||
ignore_patterns.extend(
|
||||
line.strip() for line in f
|
||||
if line.strip() and not line.startswith('#')
|
||||
)
|
||||
|
||||
# 1. Load from .praisonignore
|
||||
load_from_file(os.path.join(self.directory, '.praisonignore'))
|
||||
|
||||
# 2. Load from settings.yaml
|
||||
settings_path = os.path.join(self.directory, 'settings.yaml')
|
||||
if os.path.exists(settings_path):
|
||||
with open(settings_path, 'r') as f:
|
||||
settings = yaml.safe_load(f)
|
||||
if 'code' in settings and 'ignore_files' in settings['code']:
|
||||
ignore_patterns.extend(settings['code']['ignore_files'])
|
||||
|
||||
# 3. Load from environment variable
|
||||
ignore_files_env = os.getenv("PRAISONAI_IGNORE_FILES")
|
||||
if ignore_files_env:
|
||||
ignore_patterns.extend(ignore_files_env.split(","))
|
||||
|
||||
# 4. Load from .gitignore
|
||||
load_from_file(os.path.join(self.directory, '.gitignore'))
|
||||
|
||||
# 5. Default patterns (only if no patterns loaded from above sources)
|
||||
if not ignore_patterns:
|
||||
ignore_patterns = [
|
||||
".*", "*.pyc", "__pycache__", ".git", ".gitignore", ".vscode",
|
||||
".idea", ".DS_Store", "*.lock", "*.pyc", ".env", "docs", "tests",
|
||||
"test", "tmp", "temp", "*.txt", "*.md", "*.json", "*.csv", "*.tsv",
|
||||
"public", "*.sql", "*.sqlite", "*.db", "*.db3", "*.sqlite3",
|
||||
"*.log", "*.zip", "*.gz", "*.tar", "*.rar", "*.7z", "*.pdf",
|
||||
"*.jpg", "*.jpeg", "*.png", "*.gif", "*.svg", "cookbooks",
|
||||
"assets", "__pycache__", "dist", "build", "node_modules", "venv"
|
||||
]
|
||||
logger.debug(f"Using default ignore patterns: {ignore_patterns}")
|
||||
|
||||
# Modify patterns to match directories and add leading '*' if necessary
|
||||
modified_ignore_patterns = [
|
||||
'*' + pattern if not pattern.startswith('.') and not pattern.startswith('*') else pattern
|
||||
for pattern in ignore_patterns
|
||||
]
|
||||
logger.debug(f"Final ignore patterns: {modified_ignore_patterns}")
|
||||
return modified_ignore_patterns
|
||||
|
||||
def get_include_paths(self):
|
||||
include_paths = []
|
||||
|
||||
# 1. Load from .praisoninclude
|
||||
include_file = os.path.join(self.directory, '.praisoninclude')
|
||||
if os.path.exists(include_file):
|
||||
with open(include_file, 'r') as f:
|
||||
include_paths.extend(
|
||||
line.strip() for line in f
|
||||
if line.strip() and not line.startswith('#')
|
||||
)
|
||||
return include_paths
|
||||
|
||||
def should_ignore(self, file_path):
|
||||
"""
|
||||
Check if a file or directory should be ignored based on patterns.
|
||||
Handles both file names and directory names for more comprehensive filtering.
|
||||
"""
|
||||
relative_path = os.path.relpath(file_path, self.directory)
|
||||
if relative_path.startswith('.'):
|
||||
return True
|
||||
for pattern in self.ignore_patterns:
|
||||
if fnmatch.fnmatch(relative_path, pattern) or \
|
||||
fnmatch.fnmatch(os.path.basename(file_path), pattern):
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_relevant_file(self, file_path):
|
||||
"""Determine if a file is relevant for the context."""
|
||||
return os.path.isfile(file_path) and \
|
||||
os.path.getsize(file_path) <= self.max_file_size and \
|
||||
any(file_path.endswith(ext) for ext in self.relevant_extensions)
|
||||
|
||||
def gather_context(self):
|
||||
"""Gather context from relevant files, respecting ignore patterns and include paths."""
|
||||
context = []
|
||||
total_files = 0
|
||||
processed_files = 0
|
||||
|
||||
if not self.include_paths:
|
||||
# No include paths specified, process the entire directory
|
||||
for root, dirs, files in os.walk(self.directory):
|
||||
total_files += len(files)
|
||||
dirs[:] = [d for d in dirs if not self.should_ignore(os.path.join(root, d))]
|
||||
for file in files:
|
||||
file_path = os.path.join(root, file)
|
||||
if not self.should_ignore(file_path) and self.is_relevant_file(file_path):
|
||||
try:
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
context.append(f"File: {file_path}\n\n{content}\n\n{'='*50}\n")
|
||||
self.included_files.append(Path(file_path).relative_to(self.directory))
|
||||
except Exception as e:
|
||||
logger.error(f"Error reading {file_path}: {e}")
|
||||
processed_files += 1
|
||||
print(f"\rProcessed {processed_files}/{total_files} files", end="", flush=True)
|
||||
else:
|
||||
# Process specified include paths
|
||||
for include_path in self.include_paths:
|
||||
full_path = os.path.join(self.directory, include_path)
|
||||
if os.path.isdir(full_path):
|
||||
for root, dirs, files in os.walk(full_path):
|
||||
total_files += len(files)
|
||||
dirs[:] = [d for d in dirs if not self.should_ignore(os.path.join(root, d))]
|
||||
for file in files:
|
||||
file_path = os.path.join(root, file)
|
||||
if not self.should_ignore(file_path) and self.is_relevant_file(file_path):
|
||||
try:
|
||||
with open(file_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
context.append(f"File: {file_path}\n\n{content}\n\n{'='*50}\n")
|
||||
self.included_files.append(Path(file_path).relative_to(self.directory))
|
||||
except Exception as e:
|
||||
logger.error(f"Error reading {file_path}: {e}")
|
||||
processed_files += 1
|
||||
print(f"\rProcessed {processed_files}/{total_files} files", end="", flush=True)
|
||||
elif os.path.isfile(full_path) and self.is_relevant_file(full_path):
|
||||
try:
|
||||
with open(full_path, 'r', encoding='utf-8') as f:
|
||||
content = f.read()
|
||||
context.append(f"File: {full_path}\n\n{content}\n\n{'='*50}\n")
|
||||
self.included_files.append(Path(full_path).relative_to(self.directory))
|
||||
except Exception as e:
|
||||
logger.error(f"Error reading {full_path}: {e}")
|
||||
processed_files += 1
|
||||
print(f"\rProcessed {processed_files}/{total_files} files", end="", flush=True)
|
||||
|
||||
print() # New line after progress indicator
|
||||
return '\n'.join(context)
|
||||
|
||||
def count_tokens(self, text):
|
||||
"""Count tokens using a simple whitespace-based tokenizer."""
|
||||
return len(text.split())
|
||||
|
||||
def truncate_context(self, context):
|
||||
"""Truncate context to stay within the token limit."""
|
||||
tokens = context.split()
|
||||
if len(tokens) > self.max_tokens:
|
||||
truncated_context = ' '.join(tokens[:self.max_tokens])
|
||||
logger.warning("Context truncated due to token limit.")
|
||||
return truncated_context
|
||||
return context
|
||||
|
||||
def save_context(self, context):
|
||||
"""Save the gathered context to a file."""
|
||||
with open(self.output_file, 'w', encoding='utf-8') as f:
|
||||
f.write(context)
|
||||
|
||||
def get_context_tree(self):
|
||||
"""Generate a formatted tree structure of included files and folders."""
|
||||
tree = []
|
||||
start_dir = Path(self.directory)
|
||||
|
||||
def add_to_tree(path, prefix=''):
|
||||
contents = sorted(path.iterdir())
|
||||
pointers = [('└── ' if i == len(contents) - 1 else '├── ') for i in range(len(contents))]
|
||||
for pointer, item in zip(pointers, contents):
|
||||
rel_path = item.relative_to(start_dir)
|
||||
if rel_path in self.included_files:
|
||||
tree.append(f"{prefix}{pointer}{rel_path}")
|
||||
|
||||
if item.is_dir():
|
||||
add_to_tree(item, prefix + (' ' if pointer == '└── ' else '│ '))
|
||||
|
||||
add_to_tree(start_dir)
|
||||
return '\n'.join(tree)
|
||||
|
||||
def run(self):
|
||||
"""Execute the context gathering, truncation, and reporting."""
|
||||
context = self.gather_context()
|
||||
context = self.truncate_context(context)
|
||||
token_count = self.count_tokens(context)
|
||||
print(f"Context gathered successfully.")
|
||||
print(f"Total number of tokens (estimated): {token_count}")
|
||||
# self.save_context(context)
|
||||
context_tree = self.get_context_tree()
|
||||
logger.debug(f"Context tree:\n{context_tree}")
|
||||
return context, token_count, context_tree</code></pre>
|
||||
</details>
|
||||
<h3>Methods</h3>
|
||||
<dl>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.count_tokens"><code class="name flex">
|
||||
<span>def <span class="ident">count_tokens</span></span>(<span>self, text)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Count tokens using a simple whitespace-based tokenizer.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.gather_context"><code class="name flex">
|
||||
<span>def <span class="ident">gather_context</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Gather context from relevant files, respecting ignore patterns and include paths.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.get_context_tree"><code class="name flex">
|
||||
<span>def <span class="ident">get_context_tree</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Generate a formatted tree structure of included files and folders.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.get_ignore_patterns"><code class="name flex">
|
||||
<span>def <span class="ident">get_ignore_patterns</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Loads ignore patterns from various sources, prioritizing them in
|
||||
the following order:
|
||||
1. .praisonignore
|
||||
2. settings.yaml (under code.ignore_files)
|
||||
3. PRAISONAI_IGNORE_FILES environment variable
|
||||
4. .gitignore
|
||||
5. Default patterns</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.get_include_paths"><code class="name flex">
|
||||
<span>def <span class="ident">get_include_paths</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.is_relevant_file"><code class="name flex">
|
||||
<span>def <span class="ident">is_relevant_file</span></span>(<span>self, file_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Determine if a file is relevant for the context.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.run"><code class="name flex">
|
||||
<span>def <span class="ident">run</span></span>(<span>self)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Execute the context gathering, truncation, and reporting.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.save_context"><code class="name flex">
|
||||
<span>def <span class="ident">save_context</span></span>(<span>self, context)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Save the gathered context to a file.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.should_ignore"><code class="name flex">
|
||||
<span>def <span class="ident">should_ignore</span></span>(<span>self, file_path)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Check if a file or directory should be ignored based on patterns.
|
||||
Handles both file names and directory names for more comprehensive filtering.</p></div>
|
||||
</dd>
|
||||
<dt id="praisonai.ui.context.ContextGatherer.truncate_context"><code class="name flex">
|
||||
<span>def <span class="ident">truncate_context</span></span>(<span>self, context)</span>
|
||||
</code></dt>
|
||||
<dd>
|
||||
<div class="desc"><p>Truncate context to stay within the token limit.</p></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.ui" href="index.html">praisonai.ui</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-functions">Functions</a></h3>
|
||||
<ul class="">
|
||||
<li><code><a title="praisonai.ui.context.main" href="#praisonai.ui.context.main">main</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-classes">Classes</a></h3>
|
||||
<ul>
|
||||
<li>
|
||||
<h4><code><a title="praisonai.ui.context.ContextGatherer" href="#praisonai.ui.context.ContextGatherer">ContextGatherer</a></code></h4>
|
||||
<ul class="two-column">
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.count_tokens" href="#praisonai.ui.context.ContextGatherer.count_tokens">count_tokens</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.gather_context" href="#praisonai.ui.context.ContextGatherer.gather_context">gather_context</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.get_context_tree" href="#praisonai.ui.context.ContextGatherer.get_context_tree">get_context_tree</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.get_ignore_patterns" href="#praisonai.ui.context.ContextGatherer.get_ignore_patterns">get_ignore_patterns</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.get_include_paths" href="#praisonai.ui.context.ContextGatherer.get_include_paths">get_include_paths</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.is_relevant_file" href="#praisonai.ui.context.ContextGatherer.is_relevant_file">is_relevant_file</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.run" href="#praisonai.ui.context.ContextGatherer.run">run</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.save_context" href="#praisonai.ui.context.ContextGatherer.save_context">save_context</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.should_ignore" href="#praisonai.ui.context.ContextGatherer.should_ignore">should_ignore</a></code></li>
|
||||
<li><code><a title="praisonai.ui.context.ContextGatherer.truncate_context" href="#praisonai.ui.context.ContextGatherer.truncate_context">truncate_context</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,67 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.ui API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Namespace <code>praisonai.ui</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title" id="header-submodules">Sub-modules</h2>
|
||||
<dl>
|
||||
<dt><code class="name"><a title="praisonai.ui.context" href="context.html">praisonai.ui.context</a></code></dt>
|
||||
<dd>
|
||||
<div class="desc"></div>
|
||||
</dd>
|
||||
</dl>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="../index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><h3><a href="#header-submodules">Sub-modules</a></h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai.ui.context" href="context.html">praisonai.ui.context</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,55 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1">
|
||||
<meta name="generator" content="pdoc3 0.11.1">
|
||||
<title>praisonai.version API documentation</title>
|
||||
<meta name="description" content="">
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/sanitize.min.css" integrity="sha512-y1dtMcuvtTMJc1yPgEqF0ZjQbhnc/bFhyvIyVNb9Zk5mIGtqVaAB1Ttl28su8AvFMOY0EwRbAe+HCLqj6W7/KA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/10up-sanitize.css/13.0.0/typography.min.css" integrity="sha512-Y1DYSb995BAfxobCkKepB1BqJJTPrOp3zPL74AWFugHHmmdcvO+C48WLrUOlhGMc0QG7AE3f7gmvvcrmX2fDoA==" crossorigin>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css" crossorigin>
|
||||
<style>:root{--highlight-color:#fe9}.flex{display:flex !important}body{line-height:1.5em}#content{padding:20px}#sidebar{padding:1.5em;overflow:hidden}#sidebar > *:last-child{margin-bottom:2cm}.http-server-breadcrumbs{font-size:130%;margin:0 0 15px 0}#footer{font-size:.75em;padding:5px 30px;border-top:1px solid #ddd;text-align:right}#footer p{margin:0 0 0 1em;display:inline-block}#footer p:last-child{margin-right:30px}h1,h2,h3,h4,h5{font-weight:300}h1{font-size:2.5em;line-height:1.1em}h2{font-size:1.75em;margin:2em 0 .50em 0}h3{font-size:1.4em;margin:1.6em 0 .7em 0}h4{margin:0;font-size:105%}h1:target,h2:target,h3:target,h4:target,h5:target,h6:target{background:var(--highlight-color);padding:.2em 0}a{color:#058;text-decoration:none;transition:color .2s ease-in-out}a:visited{color:#503}a:hover{color:#b62}.title code{font-weight:bold}h2[id^="header-"]{margin-top:2em}.ident{color:#900;font-weight:bold}pre code{font-size:.8em;line-height:1.4em;padding:1em;display:block}code{background:#f3f3f3;font-family:"DejaVu Sans Mono",monospace;padding:1px 4px;overflow-wrap:break-word}h1 code{background:transparent}pre{border-top:1px solid #ccc;border-bottom:1px solid #ccc;margin:1em 0}#http-server-module-list{display:flex;flex-flow:column}#http-server-module-list div{display:flex}#http-server-module-list dt{min-width:10%}#http-server-module-list p{margin-top:0}.toc ul,#index{list-style-type:none;margin:0;padding:0}#index code{background:transparent}#index h3{border-bottom:1px solid #ddd}#index ul{padding:0}#index h4{margin-top:.6em;font-weight:bold}@media (min-width:200ex){#index .two-column{column-count:2}}@media (min-width:300ex){#index .two-column{column-count:3}}dl{margin-bottom:2em}dl dl:last-child{margin-bottom:4em}dd{margin:0 0 1em 3em}#header-classes + dl > dd{margin-bottom:3em}dd dd{margin-left:2em}dd p{margin:10px 0}.name{background:#eee;font-size:.85em;padding:5px 10px;display:inline-block;min-width:40%}.name:hover{background:#e0e0e0}dt:target .name{background:var(--highlight-color)}.name > span:first-child{white-space:nowrap}.name.class > span:nth-child(2){margin-left:.4em}.inherited{color:#999;border-left:5px solid #eee;padding-left:1em}.inheritance em{font-style:normal;font-weight:bold}.desc h2{font-weight:400;font-size:1.25em}.desc h3{font-size:1em}.desc dt code{background:inherit}.source summary,.git-link-div{color:#666;text-align:right;font-weight:400;font-size:.8em;text-transform:uppercase}.source summary > *{white-space:nowrap;cursor:pointer}.git-link{color:inherit;margin-left:1em}.source pre{max-height:500px;overflow:auto;margin:0}.source pre code{font-size:12px;overflow:visible}.hlist{list-style:none}.hlist li{display:inline}.hlist li:after{content:',\2002'}.hlist li:last-child:after{content:none}.hlist .hlist{display:inline;padding-left:1em}img{max-width:100%}td{padding:0 .5em}.admonition{padding:.1em 1em;margin-bottom:1em}.admonition-title{font-weight:bold}.admonition.note,.admonition.info,.admonition.important{background:#aef}.admonition.todo,.admonition.versionadded,.admonition.tip,.admonition.hint{background:#dfd}.admonition.warning,.admonition.versionchanged,.admonition.deprecated{background:#fd4}.admonition.error,.admonition.danger,.admonition.caution{background:lightpink}</style>
|
||||
<style media="screen and (min-width: 700px)">@media screen and (min-width:700px){#sidebar{width:30%;height:100vh;overflow:auto;position:sticky;top:0}#content{width:70%;max-width:100ch;padding:3em 4em;border-left:1px solid #ddd}pre code{font-size:1em}.name{font-size:1em}main{display:flex;flex-direction:row-reverse;justify-content:flex-end}.toc ul ul,#index ul ul{padding-left:1em}.toc > ul > li{margin-top:.5em}}</style>
|
||||
<style media="print">@media print{#sidebar h1{page-break-before:always}.source{display:none}}@media print{*{background:transparent !important;color:#000 !important;box-shadow:none !important;text-shadow:none !important}a[href]:after{content:" (" attr(href) ")";font-size:90%}a[href][title]:after{content:none}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100% !important}@page{margin:0.5cm}p,h2,h3{orphans:3;widows:3}h1,h2,h3,h4,h5,h6{page-break-after:avoid}}</style>
|
||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js" integrity="sha512-D9gUyxqja7hBtkWpPWGt9wfbfaMGVt9gnyCvYa+jojwwPHLCzUm5i8rpk7vD7wNee9bA35eYIjobYPaQuKS1MQ==" crossorigin></script>
|
||||
<script>window.addEventListener('DOMContentLoaded', () => {
|
||||
hljs.configure({languages: ['bash', 'css', 'diff', 'graphql', 'ini', 'javascript', 'json', 'plaintext', 'python', 'python-repl', 'rust', 'shell', 'sql', 'typescript', 'xml', 'yaml']});
|
||||
hljs.highlightAll();
|
||||
})</script>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<article id="content">
|
||||
<header>
|
||||
<h1 class="title">Module <code>praisonai.version</code></h1>
|
||||
</header>
|
||||
<section id="section-intro">
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
<section>
|
||||
</section>
|
||||
</article>
|
||||
<nav id="sidebar">
|
||||
<div class="toc">
|
||||
<ul></ul>
|
||||
</div>
|
||||
<ul id="index">
|
||||
<li><h3>Super-module</h3>
|
||||
<ul>
|
||||
<li><code><a title="praisonai" href="index.html">praisonai</a></code></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</main>
|
||||
<footer id="footer">
|
||||
<p>Generated by <a href="https://pdoc3.github.io/pdoc" title="pdoc: Python API documentation generator"><cite>pdoc</cite> 0.11.1</a>.</p>
|
||||
</footer>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,6 +0,0 @@
|
||||
# Auto
|
||||
## Full Automatic Mode
|
||||
|
||||
```bash
|
||||
praisonai --auto create a movie script about Dog in Moon
|
||||
```
|
||||
@@ -1,28 +0,0 @@
|
||||
# Configuration file for the Sphinx documentation builder.
|
||||
#
|
||||
# For the full list of built-in configuration values, see the documentation:
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
||||
|
||||
# -- Project information -----------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
||||
|
||||
project = 'PraisonAI'
|
||||
copyright = '2024, Mervin Praison'
|
||||
author = 'Mervin Praison'
|
||||
release = '7'
|
||||
|
||||
# -- General configuration ---------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
||||
|
||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon', 'sphinx_rtd_theme']
|
||||
|
||||
templates_path = ['_templates']
|
||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
||||
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
||||
html_theme = 'sphinx_rtd_theme'
|
||||
html_static_path = ['_static']
|
||||
@@ -1,10 +0,0 @@
|
||||
# Contributing
|
||||
|
||||
- Fork on GitHub: Use the "Fork" button on the repository page.
|
||||
- Clone your fork: `git clone https://github.com/yourusername/praisonAI.git`
|
||||
- Create a branch: `git checkout -b new-feature`
|
||||
- Make changes and commit: `git commit -am "Add some feature"`
|
||||
- Push to your fork: `git push origin new-feature`
|
||||
- Submit a pull request via GitHub's web interface.
|
||||
- Await feedback from project maintainers.
|
||||
|
||||
@@ -1,31 +0,0 @@
|
||||
# Deploy
|
||||
|
||||
## Google Cloud
|
||||
|
||||
```bash
|
||||
gcloud init
|
||||
gcloud services enable run.googleapis.com
|
||||
gcloud services enable containerregistry.googleapis.com
|
||||
gcloud services enable cloudbuild.googleapis.com
|
||||
|
||||
export OPENAI_MODEL_NAME="gpt-4o"
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
export OPENAI_API_BASE="https://api.openai.com/v1"
|
||||
|
||||
yes | gcloud auth configure-docker us-central1-docker.pkg.dev
|
||||
gcloud artifacts repositories create praisonai-repository --repository-format=docker --location=us-central1
|
||||
|
||||
PROJECT_ID=$(gcloud config get-value project)
|
||||
TAG="latest"
|
||||
docker build --platform linux/amd64 -t gcr.io/${PROJECT_ID}/praisonai-app:${TAG} .
|
||||
docker tag gcr.io/${PROJECT_ID}/praisonai-app:${TAG} us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
|
||||
docker push us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG}
|
||||
|
||||
gcloud run deploy praisonai-service \
|
||||
--image us-central1-docker.pkg.dev/${PROJECT_ID}/praisonai-repository/praisonai-app:${TAG} \
|
||||
--platform managed \
|
||||
--region us-central1 \
|
||||
--allow-unauthenticated \
|
||||
--set-env-vars OPENAI_MODEL_NAME=${OPENAI_MODEL_NAME},OPENAI_API_KEY=${OPENAI_API_KEY},OPENAI_API_BASE=${OPENAI_API_BASE}
|
||||
```
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
# Agents Playbook
|
||||
|
||||
## Simple Playbook Example
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: Artificial Intelligence
|
||||
roles:
|
||||
screenwriter:
|
||||
backstory: 'Skilled in crafting scripts with engaging dialogue about {topic}.'
|
||||
goal: Create scripts from concepts.
|
||||
role: Screenwriter
|
||||
tasks:
|
||||
scriptwriting_task:
|
||||
description: 'Develop scripts with compelling characters and dialogue about {topic}.'
|
||||
expected_output: 'Complete script ready for production.'
|
||||
```
|
||||
|
||||
## Detailed Playbook Example
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: Artificial Intelligence
|
||||
roles:
|
||||
movie_concept_creator:
|
||||
backstory: 'Creative thinker with a deep understanding of cinematic storytelling,
|
||||
capable of using AI-generated storylines to create unique and compelling movie
|
||||
ideas.'
|
||||
goal: Generate engaging movie concepts using AI storylines
|
||||
role: Movie Concept Creator
|
||||
tasks:
|
||||
movie_concept_development:
|
||||
description: 'Develop movie concepts from AI-generated storylines, ensuring
|
||||
they are engaging and have strong narrative arcs.'
|
||||
expected_output: 'Well-structured movie concept document with character
|
||||
bios, settings, and plot outlines.'
|
||||
screenwriter:
|
||||
backstory: 'Expert in writing engaging dialogue and script structure, able to
|
||||
turn movie concepts into production-ready scripts.'
|
||||
goal: Write compelling scripts based on movie concepts
|
||||
role: Screenwriter
|
||||
tasks:
|
||||
scriptwriting_task:
|
||||
description: 'Turn movie concepts into polished scripts with well-developed
|
||||
characters, strong dialogue, and effective scene transitions.'
|
||||
expected_output: 'Production-ready script with a beginning, middle, and
|
||||
end, along with character development and engaging dialogues.'
|
||||
editor:
|
||||
backstory: 'Adept at identifying inconsistencies, improving language usage,
|
||||
and maintaining the overall flow of the script.'
|
||||
goal: Refine the scripts and ensure continuity of the movie storyline
|
||||
role: Editor
|
||||
tasks:
|
||||
editing_task:
|
||||
description: 'Review, edit, and refine the scripts to ensure they are cohesive
|
||||
and follow a well-structured narrative.'
|
||||
expected_output: 'A polished final draft of the script with no inconsistencies,
|
||||
strong character development, and effective dialogue.'
|
||||
dependencies: []
|
||||
```
|
||||
@@ -1,208 +0,0 @@
|
||||
---
|
||||
jupyter:
|
||||
accelerator: GPU
|
||||
colab:
|
||||
gpuType: T4
|
||||
kernelspec:
|
||||
display_name: Python 3
|
||||
name: python3
|
||||
language_info:
|
||||
name: python
|
||||
nbformat: 4
|
||||
nbformat_minor: 0
|
||||
---
|
||||
|
||||
``` python
|
||||
!pip install -Uq praisonai duckduckgo_search
|
||||
```
|
||||
|
||||
``` python
|
||||
from duckduckgo_search import DDGS
|
||||
from praisonai_tools import BaseTool
|
||||
|
||||
class InternetSearchTool(BaseTool):
|
||||
name: str = "InternetSearchTool"
|
||||
description: str = "Search Internet for relevant information based on a query or latest news"
|
||||
|
||||
def _run(self, query: str):
|
||||
ddgs = DDGS()
|
||||
results = ddgs.text(keywords=query, region='wt-wt', safesearch='moderate', max_results=5)
|
||||
return results
|
||||
```
|
||||
|
||||
``` python
|
||||
import os
|
||||
import yaml
|
||||
from praisonai import PraisonAI
|
||||
from google.colab import userdata
|
||||
|
||||
# Example agent_yaml content
|
||||
agent_yaml = """
|
||||
framework: "crewai"
|
||||
topic: "Space Exploration"
|
||||
|
||||
roles:
|
||||
astronomer:
|
||||
role: "Space Researcher"
|
||||
goal: "Discover new insights about {topic}"
|
||||
backstory: "You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos."
|
||||
tasks:
|
||||
investigate_exoplanets:
|
||||
description: "Research and compile information about exoplanets discovered in the last decade."
|
||||
expected_output: "A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth."
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
"""
|
||||
|
||||
# Create a PraisonAI instance with the agent_yaml content
|
||||
praisonai = PraisonAI(agent_yaml=agent_yaml)
|
||||
|
||||
# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below
|
||||
os.environ["OPENAI_API_KEY"] = userdata.get('OPENAI_API_KEY') or "ENTER OPENAI_API_KEY HERE"
|
||||
|
||||
# Run PraisonAI
|
||||
result = praisonai.run()
|
||||
|
||||
# Print the result
|
||||
print(result)
|
||||
```
|
||||
|
||||
|
||||
[2024-07-03 04:53:48][DEBUG]: == Working Agent: Space Researcher
|
||||
[2024-07-03 04:53:48][INFO]: == Starting Task: Research and compile information about exoplanets discovered in the last decade.
|
||||
|
||||
|
||||
> Entering new CrewAgentExecutor chain...
|
||||
I now can give a great answer.
|
||||
|
||||
Final Answer:
|
||||
|
||||
Over the last decade, the field of exoplanet research has experienced significant advancements, leading to the discovery of thousands of exoplanets. These discoveries have been made possible through missions like NASA's Kepler and TESS (Transiting Exoplanet Survey Satellite), as well as ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, including their size, potential habitability, and distance from Earth:
|
||||
|
||||
1. **Kepler-452b**
|
||||
- **Size**: Approximately 1.6 times the radius of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, where liquid water could exist. It is often referred to as Earth's "cousin."
|
||||
- **Distance from Earth**: About 1,400 light-years
|
||||
|
||||
2. **Proxima Centauri b**
|
||||
- **Size**: About 1.17 times the mass of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of Proxima Centauri, the closest star to the Sun. It has the potential to have liquid water.
|
||||
- **Distance from Earth**: 4.24 light-years
|
||||
|
||||
3. **TRAPPIST-1 System**
|
||||
- **Size**: The system includes seven Earth-sized planets
|
||||
- **Potential Habitability**: Three of the planets (TRAPPIST-1e, TRAPPIST-1f, and TRAPPIST-1g) are located in the habitable zone and could potentially support liquid water.
|
||||
- **Distance from Earth**: Approximately 39 light-years
|
||||
|
||||
4. **LHS 1140b**
|
||||
- **Size**: About 1.4 times the size of Earth and 6.6 times its mass
|
||||
- **Potential Habitability**: Located in the habitable zone of its star. It has a thick atmosphere and conditions that could support life.
|
||||
- **Distance from Earth**: About 40 light-years
|
||||
|
||||
5. **Kepler-186f**
|
||||
- **Size**: Similar to Earth in size
|
||||
- **Potential Habitability**: The first Earth-sized planet discovered in the habitable zone of another star. It has potential for liquid water on its surface.
|
||||
- **Distance from Earth**: About 500 light-years
|
||||
|
||||
6. **K2-18b**
|
||||
- **Size**: Approximately 2.6 times the radius of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, with evidence of water vapor in its atmosphere.
|
||||
- **Distance from Earth**: About 124 light-years
|
||||
|
||||
7. **GJ 357 d**
|
||||
- **Size**: About 6.1 times the mass of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, with the potential to have liquid water on its surface.
|
||||
- **Distance from Earth**: About 31 light-years
|
||||
|
||||
These discoveries highlight the diversity of exoplanets in terms of size, composition, and potential habitability. The search for exoplanets is crucial for understanding the potential for life beyond Earth and the formation and evolution of planetary systems. Ongoing and future missions, such as the James Webb Space Telescope, are expected to provide even more detailed information about these distant worlds.
|
||||
|
||||
The continuous exploration and study of exoplanets will undoubtedly lead to new insights and perhaps even the discovery of life beyond our solar system.
|
||||
|
||||
|
||||
|
||||
> Finished chain.
|
||||
[2024-07-03 04:53:58][DEBUG]: == [Space Researcher] Task output: Over the last decade, the field of exoplanet research has experienced significant advancements, leading to the discovery of thousands of exoplanets. These discoveries have been made possible through missions like NASA's Kepler and TESS (Transiting Exoplanet Survey Satellite), as well as ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, including their size, potential habitability, and distance from Earth:
|
||||
|
||||
1. **Kepler-452b**
|
||||
- **Size**: Approximately 1.6 times the radius of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, where liquid water could exist. It is often referred to as Earth's "cousin."
|
||||
- **Distance from Earth**: About 1,400 light-years
|
||||
|
||||
2. **Proxima Centauri b**
|
||||
- **Size**: About 1.17 times the mass of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of Proxima Centauri, the closest star to the Sun. It has the potential to have liquid water.
|
||||
- **Distance from Earth**: 4.24 light-years
|
||||
|
||||
3. **TRAPPIST-1 System**
|
||||
- **Size**: The system includes seven Earth-sized planets
|
||||
- **Potential Habitability**: Three of the planets (TRAPPIST-1e, TRAPPIST-1f, and TRAPPIST-1g) are located in the habitable zone and could potentially support liquid water.
|
||||
- **Distance from Earth**: Approximately 39 light-years
|
||||
|
||||
4. **LHS 1140b**
|
||||
- **Size**: About 1.4 times the size of Earth and 6.6 times its mass
|
||||
- **Potential Habitability**: Located in the habitable zone of its star. It has a thick atmosphere and conditions that could support life.
|
||||
- **Distance from Earth**: About 40 light-years
|
||||
|
||||
5. **Kepler-186f**
|
||||
- **Size**: Similar to Earth in size
|
||||
- **Potential Habitability**: The first Earth-sized planet discovered in the habitable zone of another star. It has potential for liquid water on its surface.
|
||||
- **Distance from Earth**: About 500 light-years
|
||||
|
||||
6. **K2-18b**
|
||||
- **Size**: Approximately 2.6 times the radius of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, with evidence of water vapor in its atmosphere.
|
||||
- **Distance from Earth**: About 124 light-years
|
||||
|
||||
7. **GJ 357 d**
|
||||
- **Size**: About 6.1 times the mass of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, with the potential to have liquid water on its surface.
|
||||
- **Distance from Earth**: About 31 light-years
|
||||
|
||||
These discoveries highlight the diversity of exoplanets in terms of size, composition, and potential habitability. The search for exoplanets is crucial for understanding the potential for life beyond Earth and the formation and evolution of planetary systems. Ongoing and future missions, such as the James Webb Space Telescope, are expected to provide even more detailed information about these distant worlds.
|
||||
|
||||
The continuous exploration and study of exoplanets will undoubtedly lead to new insights and perhaps even the discovery of life beyond our solar system.
|
||||
|
||||
|
||||
### Task Output ###
|
||||
Over the last decade, the field of exoplanet research has experienced significant advancements, leading to the discovery of thousands of exoplanets. These discoveries have been made possible through missions like NASA's Kepler and TESS (Transiting Exoplanet Survey Satellite), as well as ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, including their size, potential habitability, and distance from Earth:
|
||||
|
||||
1. **Kepler-452b**
|
||||
- **Size**: Approximately 1.6 times the radius of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, where liquid water could exist. It is often referred to as Earth's "cousin."
|
||||
- **Distance from Earth**: About 1,400 light-years
|
||||
|
||||
2. **Proxima Centauri b**
|
||||
- **Size**: About 1.17 times the mass of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of Proxima Centauri, the closest star to the Sun. It has the potential to have liquid water.
|
||||
- **Distance from Earth**: 4.24 light-years
|
||||
|
||||
3. **TRAPPIST-1 System**
|
||||
- **Size**: The system includes seven Earth-sized planets
|
||||
- **Potential Habitability**: Three of the planets (TRAPPIST-1e, TRAPPIST-1f, and TRAPPIST-1g) are located in the habitable zone and could potentially support liquid water.
|
||||
- **Distance from Earth**: Approximately 39 light-years
|
||||
|
||||
4. **LHS 1140b**
|
||||
- **Size**: About 1.4 times the size of Earth and 6.6 times its mass
|
||||
- **Potential Habitability**: Located in the habitable zone of its star. It has a thick atmosphere and conditions that could support life.
|
||||
- **Distance from Earth**: About 40 light-years
|
||||
|
||||
5. **Kepler-186f**
|
||||
- **Size**: Similar to Earth in size
|
||||
- **Potential Habitability**: The first Earth-sized planet discovered in the habitable zone of another star. It has potential for liquid water on its surface.
|
||||
- **Distance from Earth**: About 500 light-years
|
||||
|
||||
6. **K2-18b**
|
||||
- **Size**: Approximately 2.6 times the radius of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, with evidence of water vapor in its atmosphere.
|
||||
- **Distance from Earth**: About 124 light-years
|
||||
|
||||
7. **GJ 357 d**
|
||||
- **Size**: About 6.1 times the mass of Earth
|
||||
- **Potential Habitability**: Located in the habitable zone of its star, with the potential to have liquid water on its surface.
|
||||
- **Distance from Earth**: About 31 light-years
|
||||
|
||||
These discoveries highlight the diversity of exoplanets in terms of size, composition, and potential habitability. The search for exoplanets is crucial for understanding the potential for life beyond Earth and the formation and evolution of planetary systems. Ongoing and future missions, such as the James Webb Space Telescope, are expected to provide even more detailed information about these distant worlds.
|
||||
|
||||
The continuous exploration and study of exoplanets will undoubtedly lead to new insights and perhaps even the discovery of life beyond our solar system.
|
||||
:::
|
||||
:::
|
||||
@@ -1,228 +0,0 @@
|
||||
---
|
||||
jupyter:
|
||||
accelerator: GPU
|
||||
colab:
|
||||
gpuType: T4
|
||||
kernelspec:
|
||||
display_name: Python 3
|
||||
name: python3
|
||||
language_info:
|
||||
name: python
|
||||
nbformat: 4
|
||||
nbformat_minor: 0
|
||||
---
|
||||
|
||||
|
||||
``` python
|
||||
!pip install -Uq praisonai
|
||||
```
|
||||
|
||||
``` python
|
||||
import os
|
||||
import yaml
|
||||
from praisonai import PraisonAI
|
||||
from google.colab import userdata
|
||||
|
||||
# Example agent_yaml content
|
||||
agent_yaml = """
|
||||
framework: "crewai"
|
||||
topic: "Space Exploration"
|
||||
|
||||
roles:
|
||||
astronomer:
|
||||
role: "Space Researcher"
|
||||
goal: "Discover new insights about {topic}"
|
||||
backstory: "You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos."
|
||||
tasks:
|
||||
investigate_exoplanets:
|
||||
description: "Research and compile information about exoplanets discovered in the last decade."
|
||||
expected_output: "A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth."
|
||||
"""
|
||||
|
||||
# Create a PraisonAI instance with the agent_yaml content
|
||||
praisonai = PraisonAI(agent_yaml=agent_yaml)
|
||||
|
||||
# Add OPENAI_API_KEY Secrets to Google Colab on the Left Hand Side 🔑 or Enter Manually Below
|
||||
os.environ["OPENAI_API_KEY"] = userdata.get('OPENAI_API_KEY') or "ENTER OPENAI_API_KEY HERE"
|
||||
|
||||
# Run PraisonAI
|
||||
result = praisonai.run()
|
||||
|
||||
# Print the result
|
||||
print(result)
|
||||
```
|
||||
|
||||
|
||||
[2024-07-03 04:39:09][DEBUG]: == Working Agent: Space Researcher
|
||||
[2024-07-03 04:39:09][INFO]: == Starting Task: Research and compile information about exoplanets discovered in the last decade.
|
||||
|
||||
|
||||
> Entering new CrewAgentExecutor chain...
|
||||
I now can give a great answer.
|
||||
|
||||
Final Answer:
|
||||
|
||||
In the last decade, the field of exoplanet research has experienced a remarkable surge in discoveries, thanks to advancements in technology and dedicated space missions such as Kepler, TESS (Transiting Exoplanet Survey Satellite), and various ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, highlighting their size, potential habitability, and distance from Earth:
|
||||
|
||||
1. **Kepler-452b**
|
||||
- **Size:** Approximately 60% larger in diameter than Earth.
|
||||
- **Potential Habitability:** Often referred to as "Earth's Cousin," Kepler-452b orbits within the habitable zone of its star, where liquid water could exist. The planet receives a similar amount of energy from its star as Earth does from the Sun.
|
||||
- **Distance from Earth:** About 1,402 light-years.
|
||||
|
||||
2. **Proxima Centauri b**
|
||||
- **Size:** Slightly larger than Earth, with a minimum mass of 1.17 Earth masses.
|
||||
- **Potential Habitability:** Located in the habitable zone of Proxima Centauri, the closest known star to the Sun. Potential for liquid water exists, but its habitability is uncertain due to stellar flare activity.
|
||||
- **Distance from Earth:** 4.24 light-years.
|
||||
|
||||
3. **TRAPPIST-1 System**
|
||||
- **Size:** The system contains seven Earth-sized planets. TRAPPIST-1e, f, and g are within the star's habitable zone.
|
||||
- **Potential Habitability:** TRAPPIST-1e is considered the most promising candidate for habitability, as it has a rocky composition and is located in the middle of the habitable zone.
|
||||
- **Distance from Earth:** About 39 light-years.
|
||||
|
||||
4. **LHS 1140 b**
|
||||
- **Size:** About 1.4 times the size of Earth with a mass of around 6.6 Earth masses.
|
||||
- **Potential Habitability:** Resides in the habitable zone of its red dwarf star. The planet is likely rocky and has an atmosphere that could support life.
|
||||
- **Distance from Earth:** Approximately 40 light-years.
|
||||
|
||||
5. **K2-18b**
|
||||
- **Size:** About 2.6 times the size of Earth with a mass of 8.6 Earth masses.
|
||||
- **Potential Habitability:** This exoplanet lies within the habitable zone and has been detected to have water vapor in its atmosphere. It is considered one of the most promising candidates for habitability outside our solar system.
|
||||
- **Distance from Earth:** Roughly 124 light-years.
|
||||
|
||||
6. **Gliese 667 Cc**
|
||||
- **Size:** At least 4.5 times the mass of Earth.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of its host star, Gliese 667 C. Its orbit allows for the possibility of liquid water on its surface.
|
||||
- **Distance from Earth:** About 23.62 light-years.
|
||||
|
||||
7. **HD 40307 g**
|
||||
- **Size:** A super-Earth with at least 7 Earth masses.
|
||||
- **Potential Habitability:** Located in the habitable zone of its star, this planet could potentially support liquid water and therefore life.
|
||||
- **Distance from Earth:** Approximately 42 light-years.
|
||||
|
||||
8. **Ross 128 b**
|
||||
- **Size:** Similar to Earth, with a minimum mass of 1.35 Earth masses.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of the relatively quiet red dwarf star Ross 128. The planet has mild temperatures that could allow for liquid water.
|
||||
- **Distance from Earth:** About 11 light-years.
|
||||
|
||||
9. **Teegarden's Star b**
|
||||
- **Size:** Comparable to Earth.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of Teegarden's Star, a cool red dwarf. Conditions could be suitable for liquid water.
|
||||
- **Distance from Earth:** Approximately 12 light-years.
|
||||
|
||||
10. **Barnard's Star b**
|
||||
- **Size:** A super-Earth with a mass of about 3.2 Earth masses.
|
||||
- **Potential Habitability:** Located just outside the traditional habitable zone, but still within a range where liquid water could exist under certain conditions.
|
||||
- **Distance from Earth:** About 6 light-years.
|
||||
|
||||
These discoveries highlight the diverse and intriguing nature of exoplanets found in the last decade. Each of these planets adds valuable information to our understanding of planetary formation, potential habitability, and the search for extraterrestrial life. Continued advancements in detection methods and technologies promise to further expand our knowledge in the years to come.
|
||||
|
||||
> Finished chain.
|
||||
[2024-07-03 04:39:25][DEBUG]: == [Space Researcher] Task output: In the last decade, the field of exoplanet research has experienced a remarkable surge in discoveries, thanks to advancements in technology and dedicated space missions such as Kepler, TESS (Transiting Exoplanet Survey Satellite), and various ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, highlighting their size, potential habitability, and distance from Earth:
|
||||
|
||||
1. **Kepler-452b**
|
||||
- **Size:** Approximately 60% larger in diameter than Earth.
|
||||
- **Potential Habitability:** Often referred to as "Earth's Cousin," Kepler-452b orbits within the habitable zone of its star, where liquid water could exist. The planet receives a similar amount of energy from its star as Earth does from the Sun.
|
||||
- **Distance from Earth:** About 1,402 light-years.
|
||||
|
||||
2. **Proxima Centauri b**
|
||||
- **Size:** Slightly larger than Earth, with a minimum mass of 1.17 Earth masses.
|
||||
- **Potential Habitability:** Located in the habitable zone of Proxima Centauri, the closest known star to the Sun. Potential for liquid water exists, but its habitability is uncertain due to stellar flare activity.
|
||||
- **Distance from Earth:** 4.24 light-years.
|
||||
|
||||
3. **TRAPPIST-1 System**
|
||||
- **Size:** The system contains seven Earth-sized planets. TRAPPIST-1e, f, and g are within the star's habitable zone.
|
||||
- **Potential Habitability:** TRAPPIST-1e is considered the most promising candidate for habitability, as it has a rocky composition and is located in the middle of the habitable zone.
|
||||
- **Distance from Earth:** About 39 light-years.
|
||||
|
||||
4. **LHS 1140 b**
|
||||
- **Size:** About 1.4 times the size of Earth with a mass of around 6.6 Earth masses.
|
||||
- **Potential Habitability:** Resides in the habitable zone of its red dwarf star. The planet is likely rocky and has an atmosphere that could support life.
|
||||
- **Distance from Earth:** Approximately 40 light-years.
|
||||
|
||||
5. **K2-18b**
|
||||
- **Size:** About 2.6 times the size of Earth with a mass of 8.6 Earth masses.
|
||||
- **Potential Habitability:** This exoplanet lies within the habitable zone and has been detected to have water vapor in its atmosphere. It is considered one of the most promising candidates for habitability outside our solar system.
|
||||
- **Distance from Earth:** Roughly 124 light-years.
|
||||
|
||||
6. **Gliese 667 Cc**
|
||||
- **Size:** At least 4.5 times the mass of Earth.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of its host star, Gliese 667 C. Its orbit allows for the possibility of liquid water on its surface.
|
||||
- **Distance from Earth:** About 23.62 light-years.
|
||||
|
||||
7. **HD 40307 g**
|
||||
- **Size:** A super-Earth with at least 7 Earth masses.
|
||||
- **Potential Habitability:** Located in the habitable zone of its star, this planet could potentially support liquid water and therefore life.
|
||||
- **Distance from Earth:** Approximately 42 light-years.
|
||||
|
||||
8. **Ross 128 b**
|
||||
- **Size:** Similar to Earth, with a minimum mass of 1.35 Earth masses.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of the relatively quiet red dwarf star Ross 128. The planet has mild temperatures that could allow for liquid water.
|
||||
- **Distance from Earth:** About 11 light-years.
|
||||
|
||||
9. **Teegarden's Star b**
|
||||
- **Size:** Comparable to Earth.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of Teegarden's Star, a cool red dwarf. Conditions could be suitable for liquid water.
|
||||
- **Distance from Earth:** Approximately 12 light-years.
|
||||
|
||||
10. **Barnard's Star b**
|
||||
- **Size:** A super-Earth with a mass of about 3.2 Earth masses.
|
||||
- **Potential Habitability:** Located just outside the traditional habitable zone, but still within a range where liquid water could exist under certain conditions.
|
||||
- **Distance from Earth:** About 6 light-years.
|
||||
|
||||
These discoveries highlight the diverse and intriguing nature of exoplanets found in the last decade. Each of these planets adds valuable information to our understanding of planetary formation, potential habitability, and the search for extraterrestrial life. Continued advancements in detection methods and technologies promise to further expand our knowledge in the years to come.
|
||||
|
||||
|
||||
### Task Output ###
|
||||
In the last decade, the field of exoplanet research has experienced a remarkable surge in discoveries, thanks to advancements in technology and dedicated space missions such as Kepler, TESS (Transiting Exoplanet Survey Satellite), and various ground-based observatories. Here is a summarized report on some of the notable exoplanet discoveries, highlighting their size, potential habitability, and distance from Earth:
|
||||
|
||||
1. **Kepler-452b**
|
||||
- **Size:** Approximately 60% larger in diameter than Earth.
|
||||
- **Potential Habitability:** Often referred to as "Earth's Cousin," Kepler-452b orbits within the habitable zone of its star, where liquid water could exist. The planet receives a similar amount of energy from its star as Earth does from the Sun.
|
||||
- **Distance from Earth:** About 1,402 light-years.
|
||||
|
||||
2. **Proxima Centauri b**
|
||||
- **Size:** Slightly larger than Earth, with a minimum mass of 1.17 Earth masses.
|
||||
- **Potential Habitability:** Located in the habitable zone of Proxima Centauri, the closest known star to the Sun. Potential for liquid water exists, but its habitability is uncertain due to stellar flare activity.
|
||||
- **Distance from Earth:** 4.24 light-years.
|
||||
|
||||
3. **TRAPPIST-1 System**
|
||||
- **Size:** The system contains seven Earth-sized planets. TRAPPIST-1e, f, and g are within the star's habitable zone.
|
||||
- **Potential Habitability:** TRAPPIST-1e is considered the most promising candidate for habitability, as it has a rocky composition and is located in the middle of the habitable zone.
|
||||
- **Distance from Earth:** About 39 light-years.
|
||||
|
||||
4. **LHS 1140 b**
|
||||
- **Size:** About 1.4 times the size of Earth with a mass of around 6.6 Earth masses.
|
||||
- **Potential Habitability:** Resides in the habitable zone of its red dwarf star. The planet is likely rocky and has an atmosphere that could support life.
|
||||
- **Distance from Earth:** Approximately 40 light-years.
|
||||
|
||||
5. **K2-18b**
|
||||
- **Size:** About 2.6 times the size of Earth with a mass of 8.6 Earth masses.
|
||||
- **Potential Habitability:** This exoplanet lies within the habitable zone and has been detected to have water vapor in its atmosphere. It is considered one of the most promising candidates for habitability outside our solar system.
|
||||
- **Distance from Earth:** Roughly 124 light-years.
|
||||
|
||||
6. **Gliese 667 Cc**
|
||||
- **Size:** At least 4.5 times the mass of Earth.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of its host star, Gliese 667 C. Its orbit allows for the possibility of liquid water on its surface.
|
||||
- **Distance from Earth:** About 23.62 light-years.
|
||||
|
||||
7. **HD 40307 g**
|
||||
- **Size:** A super-Earth with at least 7 Earth masses.
|
||||
- **Potential Habitability:** Located in the habitable zone of its star, this planet could potentially support liquid water and therefore life.
|
||||
- **Distance from Earth:** Approximately 42 light-years.
|
||||
|
||||
8. **Ross 128 b**
|
||||
- **Size:** Similar to Earth, with a minimum mass of 1.35 Earth masses.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of the relatively quiet red dwarf star Ross 128. The planet has mild temperatures that could allow for liquid water.
|
||||
- **Distance from Earth:** About 11 light-years.
|
||||
|
||||
9. **Teegarden's Star b**
|
||||
- **Size:** Comparable to Earth.
|
||||
- **Potential Habitability:** Orbits within the habitable zone of Teegarden's Star, a cool red dwarf. Conditions could be suitable for liquid water.
|
||||
- **Distance from Earth:** Approximately 12 light-years.
|
||||
|
||||
10. **Barnard's Star b**
|
||||
- **Size:** A super-Earth with a mass of about 3.2 Earth masses.
|
||||
- **Potential Habitability:** Located just outside the traditional habitable zone, but still within a range where liquid water could exist under certain conditions.
|
||||
- **Distance from Earth:** About 6 light-years.
|
||||
|
||||
These discoveries highlight the diverse and intriguing nature of exoplanets found in the last decade. Each of these planets adds valuable information to our understanding of planetary formation, potential habitability, and the search for extraterrestrial life. Continued advancements in detection methods and technologies promise to further expand our knowledge in the years to come.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Test
|
||||
|
||||
```bash
|
||||
python -m unittest tests.test
|
||||
```
|
||||
@@ -1,43 +0,0 @@
|
||||
# Integrate with Tools
|
||||
|
||||
```python
|
||||
from praisonai import PraisonAI
|
||||
from duckduckgo_search import DDGS
|
||||
from praisonai_tools import BaseTool
|
||||
|
||||
class InternetSearchTool(BaseTool):
|
||||
name: str = "InternetSearchTool"
|
||||
description: str = "Search Internet for relevant information based on a query or latest news"
|
||||
|
||||
def _run(self, query: str):
|
||||
ddgs = DDGS()
|
||||
results = ddgs.text(keywords=query, region='wt-wt', safesearch='moderate', max_results=5)
|
||||
return results
|
||||
|
||||
# Example agent_yaml content
|
||||
agent_yaml = """
|
||||
framework: "crewai"
|
||||
topic: "Space Exploration"
|
||||
|
||||
roles:
|
||||
astronomer:
|
||||
role: "Space Researcher"
|
||||
goal: "Discover new insights about {topic}"
|
||||
backstory: "You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos."
|
||||
tasks:
|
||||
investigate_exoplanets:
|
||||
description: "Research and compile information about exoplanets discovered in the last decade."
|
||||
expected_output: "A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth."
|
||||
tools:
|
||||
- "InternetSearchTool"
|
||||
"""
|
||||
|
||||
# Create a PraisonAI instance with the agent_yaml content
|
||||
praisonai = PraisonAI(agent_yaml=agent_yaml)
|
||||
|
||||
# Run PraisonAI
|
||||
result = praisonai.run()
|
||||
|
||||
# Print the result
|
||||
print(result)
|
||||
```
|
||||
@@ -1,79 +0,0 @@
|
||||
# Include praisonai package in your project
|
||||
|
||||
## Option 1: Using RAW YAML
|
||||
|
||||
```python
|
||||
from praisonai import PraisonAI
|
||||
|
||||
# Example agent_yaml content
|
||||
agent_yaml = """
|
||||
framework: "crewai"
|
||||
topic: "Space Exploration"
|
||||
|
||||
roles:
|
||||
astronomer:
|
||||
role: "Space Researcher"
|
||||
goal: "Discover new insights about {topic}"
|
||||
backstory: "You are a curious and dedicated astronomer with a passion for unraveling the mysteries of the cosmos."
|
||||
tasks:
|
||||
investigate_exoplanets:
|
||||
description: "Research and compile information about exoplanets discovered in the last decade."
|
||||
expected_output: "A summarized report on exoplanet discoveries, including their size, potential habitability, and distance from Earth."
|
||||
"""
|
||||
|
||||
# Create a PraisonAI instance with the agent_yaml content
|
||||
praisonai = PraisonAI(agent_yaml=agent_yaml)
|
||||
|
||||
# Run PraisonAI
|
||||
result = praisonai.run()
|
||||
|
||||
# Print the result
|
||||
print(result)
|
||||
```
|
||||
|
||||
## Option 2: Using separate agents.yaml file
|
||||
|
||||
|
||||
Note: Please create agents.yaml file before hand.
|
||||
|
||||
```python
|
||||
from praisonai import PraisonAI
|
||||
|
||||
def basic(): # Basic Mode
|
||||
praisonai = PraisonAI(agent_file="agents.yaml")
|
||||
praisonai.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
basic()
|
||||
```
|
||||
|
||||
## Other options
|
||||
|
||||
```python
|
||||
from praisonai import PraisonAI
|
||||
|
||||
def basic(): # Basic Mode
|
||||
praisonai = PraisonAI(agent_file="agents.yaml")
|
||||
praisonai.run()
|
||||
|
||||
def advanced(): # Advanced Mode with options
|
||||
praisonai = PraisonAI(
|
||||
agent_file="agents.yaml",
|
||||
framework="autogen",
|
||||
)
|
||||
praisonai.run()
|
||||
|
||||
def auto(): # Full Automatic Mode
|
||||
praisonai = PraisonAI(
|
||||
auto="Create a movie script about car in mars",
|
||||
framework="autogen"
|
||||
)
|
||||
print(praisonai.framework)
|
||||
praisonai.run()
|
||||
|
||||
if __name__ == "__main__":
|
||||
basic()
|
||||
advanced()
|
||||
auto()
|
||||
```
|
||||
|
||||
@@ -1,42 +0,0 @@
|
||||
# Firecrawl PraisonAI Integration
|
||||
|
||||
## Firecrawl running in Localhost:3002
|
||||
|
||||
```python
|
||||
from firecrawl import FirecrawlApp
|
||||
from praisonai_tools import BaseTool
|
||||
import re
|
||||
|
||||
class WebPageScraperTool(BaseTool):
|
||||
name: str = "Web Page Scraper Tool"
|
||||
description: str = "Scrape and extract information from a given web page URL."
|
||||
|
||||
def _run(self, url: str) -> str:
|
||||
app = FirecrawlApp(api_url='http://localhost:3002')
|
||||
response = app.scrape_url(url=url)
|
||||
content = response["content"]
|
||||
# Remove all content above the line "========================================================"
|
||||
if "========================================================" in content:
|
||||
content = content.split("========================================================", 1)[1]
|
||||
|
||||
# Remove all menu items and similar patterns
|
||||
content = re.sub(r'\*\s+\[.*?\]\(.*?\)', '', content)
|
||||
content = re.sub(r'\[Skip to the content\]\(.*?\)', '', content)
|
||||
content = re.sub(r'\[.*?\]\(.*?\)', '', content)
|
||||
content = re.sub(r'\s*Menu\s*', '', content)
|
||||
content = re.sub(r'\s*Search\s*', '', content)
|
||||
content = re.sub(r'Categories\s*', '', content)
|
||||
|
||||
# Remove all URLs
|
||||
content = re.sub(r'http\S+', '', content)
|
||||
|
||||
# Remove empty lines or lines with only whitespace
|
||||
content = '\n'.join([line for line in content.split('\n') if line.strip()])
|
||||
|
||||
# Limit to the first 1000 words
|
||||
words = content.split()
|
||||
if len(words) > 1000:
|
||||
content = ' '.join(words[:1000])
|
||||
|
||||
return content
|
||||
```
|
||||
@@ -1,19 +0,0 @@
|
||||
# AutoGen Low Code with Praison AI
|
||||
|
||||
Low Code solution to run AutoGen
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
```
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
```bash
|
||||
praisonai --framework autogen --init Create a Movie Script About Cat in Mars
|
||||
```
|
||||
|
||||
```bash
|
||||
praisonai --framework autogen
|
||||
```
|
||||
@@ -1,19 +0,0 @@
|
||||
# CrewAI Low Code with PraisonAI
|
||||
|
||||
Low Code solution to run CrewAI
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
```
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
```bash
|
||||
praisonai --framework crewai --init Create a Movie Script About Cat in Mars
|
||||
```
|
||||
|
||||
```bash
|
||||
praisonai --framework crewai
|
||||
```
|
||||
@@ -1,11 +0,0 @@
|
||||
#!/bin/sh
|
||||
set -e # Exit if any command fails
|
||||
|
||||
# Install necessary packages
|
||||
pip install pdoc3 mkdocs mkdocs-material duckduckgo_search
|
||||
|
||||
# Generate HTML documentation with pdoc
|
||||
pdoc --html --skip-errors -o docs/api praisonai --force
|
||||
|
||||
# Build the MkDocs site
|
||||
mkdocs build
|
||||
@@ -1,64 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ensure we are in the docs folder
|
||||
cd "$(dirname "$0")"
|
||||
|
||||
# Define the sections and their corresponding filenames
|
||||
sections=(
|
||||
"Praison AI:index.md"
|
||||
"TL;DR:tldr.md"
|
||||
"Installation:installation.md"
|
||||
"Initialise:initialise.md"
|
||||
"Run:run.md"
|
||||
"Create Custom Tools:create_custom_tools.md"
|
||||
"Test:test.md"
|
||||
"Agents Playbook:agents_playbook.md"
|
||||
"Include praisonai package in your project:include_package.md"
|
||||
"Deploy:deploy.md"
|
||||
"Other Models:other_models.md"
|
||||
"Contributing:contributing.md"
|
||||
)
|
||||
|
||||
# Function to extract section content
|
||||
extract_section() {
|
||||
section_name="$1"
|
||||
input_file="$2"
|
||||
output_file="$3"
|
||||
|
||||
# Escape special characters in section name for use in regex
|
||||
section_name_escaped=$(echo "$section_name" | sed 's/[.[\*^$(){}?+|]/\\&/g')
|
||||
|
||||
# Extract content
|
||||
if command -v gsed > /dev/null; then
|
||||
gsed -n "/## $section_name_escaped/,/## /{p;}" "$input_file" | gsed '$d' >> "$output_file"
|
||||
else
|
||||
sed -n "/## $section_name_escaped/,/## /{p;}" "$input_file" | sed '$d' >> "$output_file"
|
||||
fi
|
||||
}
|
||||
|
||||
# Extract content above the first section from README.md
|
||||
if command -v gsed > /dev/null; then
|
||||
gsed -n '1,/^## /{p;}' ../README.md | gsed '$d' > index.md
|
||||
else
|
||||
sed -n '1,/^## /{p;}' ../README.md | sed '$d' > index.md
|
||||
fi
|
||||
|
||||
# Create the files and add content
|
||||
for section in "${sections[@]}"; do
|
||||
section_name="${section%%:*}"
|
||||
filename="${section##*:}"
|
||||
if [[ "$filename" == "index.md" ]]; then
|
||||
extract_section "$section_name" ../README.md index.md
|
||||
elif [[ "$section_name" == "TL;DR" ]]; then
|
||||
extract_section "$section_name" ../README.md index.md
|
||||
else
|
||||
extract_section "$section_name" ../README.md "$filename"
|
||||
fi
|
||||
done
|
||||
|
||||
# Special handling for the last section (Contributing)
|
||||
if command -v gsed > /dev/null; then
|
||||
gsed -n "/## Contributing/,\$p" ../README.md > "contributing.md"
|
||||
else
|
||||
sed -n "/## Contributing/,\$p" ../README.md > "contributing.md"
|
||||
fi
|
||||
@@ -1,112 +0,0 @@
|
||||
# Home
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="images/praisonai-logo-large.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="images/praisonai-logo-large.png">
|
||||
<img alt="PraisonAI Logo" src="images/praisonai-logo-large.png">
|
||||
</picture>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://static.pepy.tech/badge/PraisonAI" alt="Total Downloads"></a>
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/github/v/release/MervinPraison/PraisonAI" alt="Latest Stable Version"></a>
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
|
||||
# Praison AI
|
||||
|
||||
</div>
|
||||
|
||||
Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
|
||||
|
||||
<div align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="images/architecture-dark.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="images/architecture-light.png">
|
||||
<img alt="PraisonAI Architecture" src="images/architecture-light.png">
|
||||
</picture>
|
||||
</div>
|
||||
|
||||
## Different User Interfaces:
|
||||
|
||||
| Interface | Description | URL |
|
||||
|---|---|---|
|
||||
| **UI** | Multi Agents such as CrewAI or AutoGen | [https://docs.praison.ai/ui/ui](https://docs.praison.ai/ui/ui) |
|
||||
| **Chat** | Chat with 100+ LLMs, single AI Agent | [https://docs.praison.ai/ui/chat](https://docs.praison.ai/ui/chat) |
|
||||
| **Code** | Chat with entire Codebase, single AI Agent | [https://docs.praison.ai/ui/code](https://docs.praison.ai/ui/code) |
|
||||
|
||||
## Google Colab Multi Agents
|
||||
|
||||
| | Cookbook | Open in Colab |
|
||||
| ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
||||
| Include Tools | PraisonAI Tools | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-tools-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
||||
|
||||
## Install
|
||||
|
||||
| PraisonAI | PraisonAI Code | PraisonAI Chat |
|
||||
| --- | --- | --- |
|
||||
| `pip install praisonai` | `pip install "praisonai[code]"` | `pip install "praisonai[chat]"` |
|
||||
|
||||
## TL;DR Multi Agents
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
praisonai --init create a movie script about dog in moon
|
||||
praisonai
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
```
|
||||
|
||||
## Initialise
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
```
|
||||
|
||||
Generate your OPENAI API KEY from here: https://platform.openai.com/api-keys
|
||||
|
||||
Note: You can use other providers such as Ollama, Mistral ... etc. Details are provided at the bottom.
|
||||
|
||||
```bash
|
||||
praisonai --init create a movie script about dog in moon
|
||||
```
|
||||
This will automatically create agents.yaml file in the current directory.
|
||||
|
||||
### To initialse with a specific agent framework (Optional):
|
||||
|
||||
```bash
|
||||
praisonai --framework autogen --init create movie script about cat in mars
|
||||
```
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
praisonai
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```bash
|
||||
python -m praisonai
|
||||
```
|
||||
|
||||
### Specify the agent framework (Optional):
|
||||
|
||||
```bash
|
||||
praisonai --framework autogen
|
||||
```
|
||||
|
||||
### Full Automatic Mode
|
||||
|
||||
```bash
|
||||
praisonai --auto create a movie script about Dog in Moon
|
||||
```
|
||||
@@ -1,836 +0,0 @@
|
||||
{
|
||||
"type": "excalidraw",
|
||||
"version": 2,
|
||||
"source": "https://excalidraw.com",
|
||||
"elements": [
|
||||
{
|
||||
"id": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"type": "rectangle",
|
||||
"x": 536.4349670410156,
|
||||
"y": -677.1792297363279,
|
||||
"width": 178.43490600585935,
|
||||
"height": 44.315124511718736,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0g",
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1579902398,
|
||||
"version": 443,
|
||||
"versionNonce": 523921598,
|
||||
"isDeleted": false,
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "rXvHMTDzQw3KXG5Bw6Miq"
|
||||
},
|
||||
{
|
||||
"id": "3zLj8LrUzhGGXhZaDSJgs",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "cKGXib4-dKdUl9yJcSfq-",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "BS019CDTkphQWLmagOrGS",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295852022,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "rXvHMTDzQw3KXG5Bw6Miq",
|
||||
"type": "text",
|
||||
"x": 564.0524749755859,
|
||||
"y": -667.5216674804685,
|
||||
"width": 123.19989013671875,
|
||||
"height": 25,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0gV",
|
||||
"roundness": null,
|
||||
"seed": 1207531362,
|
||||
"version": 342,
|
||||
"versionNonce": 538330338,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295807540,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"text": "Multi Agents",
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"originalText": "Multi Agents",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 725,
|
||||
"versionNonce": 1063769278,
|
||||
"index": "b0i",
|
||||
"isDeleted": false,
|
||||
"id": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 823.7187652587891,
|
||||
"y": -680.7326354980466,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 186.26303100585935,
|
||||
"height": 40.635437011718736,
|
||||
"seed": 1055936190,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"id": "YYmrmCN3zGtGeOPK2Ccbw",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "Fnl1rz2BlXU6J8Yq8YZwu"
|
||||
},
|
||||
{
|
||||
"id": "e8q5v4IQp7HYVNQjKLNNS",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "jBFbBBsN9eixvuKN38SL2",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295856562,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "Fnl1rz2BlXU6J8Yq8YZwu",
|
||||
"type": "text",
|
||||
"x": 858.4403305053711,
|
||||
"y": -672.9149169921873,
|
||||
"width": 116.81990051269531,
|
||||
"height": 25,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0iV",
|
||||
"roundness": null,
|
||||
"seed": 594220962,
|
||||
"version": 142,
|
||||
"versionNonce": 1682602622,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295812159,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"text": "Single Agent",
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"originalText": "Single Agent",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "3zLj8LrUzhGGXhZaDSJgs",
|
||||
"type": "arrow",
|
||||
"x": 775.7563686946191,
|
||||
"y": -733.9083557128904,
|
||||
"width": 64.00441130704803,
|
||||
"height": 52.950469970703125,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0k",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 1611346302,
|
||||
"version": 800,
|
||||
"versionNonce": 1469757538,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721296052140,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
-64.00441130704803,
|
||||
52.950469970703125
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": null,
|
||||
"endBinding": {
|
||||
"elementId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"gap": 3.778656005859375,
|
||||
"focus": 0.47197049085398457
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "YYmrmCN3zGtGeOPK2Ccbw",
|
||||
"type": "arrow",
|
||||
"x": 810.3017634410855,
|
||||
"y": -732.6739807128904,
|
||||
"width": 85.77694061921636,
|
||||
"height": 44.679656982421875,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0l",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 412089534,
|
||||
"version": 776,
|
||||
"versionNonce": 774462498,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721296052140,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
85.77694061921636,
|
||||
44.679656982421875
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": null,
|
||||
"endBinding": {
|
||||
"elementId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"gap": 7.261688232421875,
|
||||
"focus": 0.24350278296403458
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 752,
|
||||
"versionNonce": 1452690686,
|
||||
"index": "b0o",
|
||||
"isDeleted": false,
|
||||
"id": "nsG_S4C6dOJXv5Hn71Vpv",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 491.27333068847656,
|
||||
"y": -569.7236175537107,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 902159166,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "EDt610N0slRoDwCoDDSiH"
|
||||
},
|
||||
{
|
||||
"id": "cKGXib4-dKdUl9yJcSfq-",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295849323,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 535,
|
||||
"versionNonce": 1980346430,
|
||||
"index": "b0p",
|
||||
"isDeleted": false,
|
||||
"id": "EDt610N0slRoDwCoDDSiH",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 522.0554462645805,
|
||||
"y": -563.5003986210853,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 68.61994934082031,
|
||||
"height": 25,
|
||||
"seed": 2032386942,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295835808,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "CrewAI",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "nsG_S4C6dOJXv5Hn71Vpv",
|
||||
"originalText": "CrewAI",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 851,
|
||||
"versionNonce": 1844039998,
|
||||
"index": "b0q",
|
||||
"isDeleted": false,
|
||||
"id": "QCX8dp2PO9HkjqWidvhuK",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 648.4615867188858,
|
||||
"y": -569.9485283193521,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 555393982,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "hGN-D4W-BHfkd2cd-XnSP"
|
||||
},
|
||||
{
|
||||
"id": "BS019CDTkphQWLmagOrGS",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295852022,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 241,
|
||||
"versionNonce": 2015226750,
|
||||
"index": "b0r",
|
||||
"isDeleted": false,
|
||||
"id": "hGN-D4W-BHfkd2cd-XnSP",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 672.0937083985053,
|
||||
"y": -563.7253093867267,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 82.91993713378906,
|
||||
"height": 25,
|
||||
"seed": 533429246,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295841280,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "AutoGen",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "QCX8dp2PO9HkjqWidvhuK",
|
||||
"originalText": "AutoGen",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 768,
|
||||
"versionNonce": 1459025150,
|
||||
"index": "b0s",
|
||||
"isDeleted": false,
|
||||
"id": "7Ii8GSxtLkw5d3u_f-_kt",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 819.1223602294922,
|
||||
"y": -575.3343048095701,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 1314962402,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "nbS4zZL3SX1ojYnZ8ubj4"
|
||||
},
|
||||
{
|
||||
"id": "e8q5v4IQp7HYVNQjKLNNS",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295854370,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 546,
|
||||
"versionNonce": 1535924578,
|
||||
"index": "b0t",
|
||||
"isDeleted": false,
|
||||
"id": "nbS4zZL3SX1ojYnZ8ubj4",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 860.5144687865532,
|
||||
"y": -569.1110858769447,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 47.39996337890625,
|
||||
"height": 25,
|
||||
"seed": 1952640930,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295829009,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "Chat",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "7Ii8GSxtLkw5d3u_f-_kt",
|
||||
"originalText": "Chat",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 963,
|
||||
"versionNonce": 1521237310,
|
||||
"index": "b0u",
|
||||
"isDeleted": false,
|
||||
"id": "PqS5K_ghWhUe3nTiPZEWE",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 970.203835254042,
|
||||
"y": -574.8456535634928,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 1265150818,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "sCKqppUowczlf2-SGqYyT"
|
||||
},
|
||||
{
|
||||
"id": "jBFbBBsN9eixvuKN38SL2",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295856562,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 343,
|
||||
"versionNonce": 1701505250,
|
||||
"index": "b0v",
|
||||
"isDeleted": false,
|
||||
"id": "sCKqppUowczlf2-SGqYyT",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 1012.1559489990913,
|
||||
"y": -568.6224346308674,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 46.27995300292969,
|
||||
"height": 25,
|
||||
"seed": 2042687266,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295829009,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "Code",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "PqS5K_ghWhUe3nTiPZEWE",
|
||||
"originalText": "Code",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "cKGXib4-dKdUl9yJcSfq-",
|
||||
"type": "arrow",
|
||||
"x": 627.2005615234375,
|
||||
"y": -630.5438232421873,
|
||||
"width": 60.1224365234375,
|
||||
"height": 55.1927490234375,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0w",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 233127038,
|
||||
"version": 98,
|
||||
"versionNonce": 1160484030,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295849323,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
-60.1224365234375,
|
||||
55.1927490234375
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"focus": -0.24888641301408482,
|
||||
"gap": 2.320281982421875
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "nsG_S4C6dOJXv5Hn71Vpv",
|
||||
"focus": -0.18497317396435772,
|
||||
"gap": 5.627456665039119
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "BS019CDTkphQWLmagOrGS",
|
||||
"type": "arrow",
|
||||
"x": 630.2474365234375,
|
||||
"y": -629.0698547363279,
|
||||
"width": 80.703125,
|
||||
"height": 53.463531494140625,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0x",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 310377790,
|
||||
"version": 80,
|
||||
"versionNonce": 799711486,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295852022,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
80.703125,
|
||||
53.463531494140625
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"focus": 0.28190124455103954,
|
||||
"gap": 3.79425048828125
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "QCX8dp2PO9HkjqWidvhuK",
|
||||
"focus": 0.366344355951018,
|
||||
"gap": 5.657794922835194
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "e8q5v4IQp7HYVNQjKLNNS",
|
||||
"type": "arrow",
|
||||
"x": 923.2083740234375,
|
||||
"y": -638.9448547363279,
|
||||
"width": 36.4427490234375,
|
||||
"height": 58.135406494140625,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0y",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 895023486,
|
||||
"version": 78,
|
||||
"versionNonce": 780221630,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295854370,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
-36.4427490234375,
|
||||
58.135406494140625
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"focus": -0.1871843733465698,
|
||||
"gap": 1.15234375
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "7Ii8GSxtLkw5d3u_f-_kt",
|
||||
"focus": -0.16423249726949576,
|
||||
"gap": 5.475143432617244
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "jBFbBBsN9eixvuKN38SL2",
|
||||
"type": "arrow",
|
||||
"x": 922.2291870117188,
|
||||
"y": -637.4943237304685,
|
||||
"width": 98.93487548828125,
|
||||
"height": 53.84375,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0z",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 277587262,
|
||||
"version": 96,
|
||||
"versionNonce": 1061850366,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295856562,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
98.93487548828125,
|
||||
53.84375
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"focus": 0.2815822612188661,
|
||||
"gap": 2.602874755859375
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "PqS5K_ghWhUe3nTiPZEWE",
|
||||
"focus": 0.3663457157233071,
|
||||
"gap": 8.804920166975819
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "TPQS4IlMmufv2ygx4l4Yf",
|
||||
"type": "image",
|
||||
"x": 653.6796875,
|
||||
"y": -811.0686543782549,
|
||||
"width": 266.3379620962191,
|
||||
"height": 88.4737120216356,
|
||||
"angle": 0,
|
||||
"strokeColor": "transparent",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b10",
|
||||
"roundness": null,
|
||||
"seed": 1698053026,
|
||||
"version": 457,
|
||||
"versionNonce": 1848779518,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721296094680,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"status": "saved",
|
||||
"fileId": "80dea94d36f7e9692b17699d94280a7f4cdefbfe",
|
||||
"scale": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
}
|
||||
],
|
||||
"appState": {
|
||||
"gridSize": null,
|
||||
"viewBackgroundColor": "#ffffff"
|
||||
},
|
||||
"files": {
|
||||
"80dea94d36f7e9692b17699d94280a7f4cdefbfe": {
|
||||
"mimeType": "image/png",
|
||||
"id": "80dea94d36f7e9692b17699d94280a7f4cdefbfe",
|
||||
"dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkUAAADBCAYAAADBwMQmAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQn8f9Wc/98vIo1thCiJRKIyIWuIKERky9QQGtkyUShZhmRpNGQra8k24l/EZGRJ9n2LUBHJoGTfBoP3/7ya8+Xbx2e5595z7j3383mdx+Pz+MX33HPf53nvPfd93+e9wNREQAREQAREQAREQAQMYiACIiACIiACIiACImBSinQTiIAIiIAIiIAIiAAJyFKk+0AEREAEREAEREAEpBSZuftVzewWZnZTM9sk/q5pZvxdzcw2NLPLx3/535cxs9/F3x/iv7+f+Pd/zOxHZnahmX0//i4ws/MB8Fg1ERABERABERCBygisjKXI3Tcys38ws5uZ2bZmto2ZbW1mW0RFp49L82cz+2lUln5oZl83s6+a2RfN7EwA/LuaCIiACIiACIjAAASWVily9+uY2e5mdjcz28HMbmBmGwzAuOkpaV06JypKZ0VF6SOyLDXFp34iIAIiIAIi0I3A0ihF7n4FM7urme1mZjub2fY9WoC6XYXZR//azD4T5nOGmZ0G4AulTqRxRUAEREAERGDVCYxaKXJ3boHtaWa7mNntzOxKS35BfxAsXx83sw+FbcB3ALh4yeer6YmACIiACIhAbwRGpxS5+1XMbJ/422kJrEFtLzYdtt8X/KL+IypIf2w7kI4TAREQAREQAREYUUi+u3NbbF8z28PMqBip/ZXARVSMgt/UGwF8WmBEQASaE3D3O8VI088CYACEmgiIwIoSqNpS5O43NLNHmNk/RkfpFb1MSdP+ipm9zMxer2i2JG7qvAIE3H27EPH5gOCrd08zu82MKTONxqfM7FQAb1gBLJqiCIhAJFClUuTuzBt0qJndv/KIsZpvpPPM7CVm9hoAzKekJgIrSyAqQ88yswcmQqCCdBSAlyYep+4iIAIjJFCVUuTutw9JEJ8aQ+kvO0KeNYr8vWg5eiWA39QooGQSgZIE3P04M9uv4zm+EfKLPQbARzuOo8NFQAQqJlCFUuTuDKWnZYg5haqQqeJr1lY0+ko8EwBfEGoisPQE3H1TM+P2166ZJvtLM3sCgBMyjadhREAEKiMwqALi7vcws6eZ2R0r47LM4nw4Luz0PVITgaUkEBWi083sJgUmeBAAbk2riYAILBmBQZQid2edsSNjJNmSIR3FdBjOT2fs52hLbRTXS0ImEghb8e9fYCH6lZlxS+yTIZjju6xLGJO+XnddGaB5Z91ZW2mJF0XdRWAEBHpVimLx1SPM7FGxwOoIEC21iN82s8cC4AtETQSWgoC7Hx+jVmfN5/Vm9vR54ffuzqSwx4RAhc1mDMKttJ0AsCSPmgiIwJIQ6E0pcndGfbzYzPglplYPgf8NflyHA3hePSJJEhFoRyBGmbHI8rTGjPAHADilyehxC47PBdOCTGsnB6UoNZqtyanVRwREYCACxZUid+eX1itCFfj7DTRHnbYZgXdz8Qfw02bd1UsE6iMQlKKTYh6iSeGoEO3YJjmjuz/bzBjOP61tL2tRffeBJBKBtgSKKkXuzjxDNEFfu62AOq5XAt9k+RQAn+/1rDqZCGQgsMBKdL+mFqJporg7CzPfesrfPgggV3RbBgoaQgREoAuBIkqRu29kZkdH36Ei5+gyaR07lwBzGe0LgGVD1ERgNATmWHSY3b1TnqK4lXaOmV15AsgvAVx1NJAkqAiIwFwC2RUWd79BCIN9G03VYj9aAoxOezgAXkc1ERgFAXf/QMx1NinvZm22zSYHmaN0dbJCjQKuhBSBFSGQVSlyd5qR32Rm11oRfss8TZYG2R/AG5d5kprb8hDwoLVMmQ2LvM6qcZY0+RiR9s4pB70EwEFJg6mzCIhAlQSyKUXu/lDW2Qr5h65Q5UwlVBsCf4wh+69rc7COEYE+CcxQijpvna2fw4xzSCnq80LrXCJQkEAWpcjd+ZV0lJmpXlnBizXQ0H9i3ShZjAair9M2IjDHyTpr9ml3Z8LHbSaEymaNajRZdRIBEShGoLNSFBWiF6lmWbFrVMPAdL7eDQCz/6qJQHUE5mxtZfX3mRGFJqWoujtCAolAOwKdlCJ33z/4D71yJBYivtgvjr8fxX8vMjOm+6dj8e/jv/xv/uifsGH8cUuQ/83Ik2vG3zVC/iX+mIzy6u3wj+qo/44ZfC8YldQSdmUI9LG1FT4CfxGS0F5lAqqSOK7MXaaJLjuB1kqRu+9uZswMe7nKIP0k1jRizh2G0NLcfSYA1jcq0mKCyptFs/p2ZnYrM2N9tw2KnHC4QT9rZncG8D/DiaAzi8B0AjOUomx5hOZs0cmnSDelCCwJgVZKUSzo+tEKLCS05lD5+ZyZMbnaxwB8uYZrE+u83ZlKRJDtnmZ24xrkyiDDmwHQqV5NBKoiECzX359Sq+z7ADbPIai7P9zMWDdtsmX1W8ohq8YQARFoRyBZKXJ3mo4/FS0h7c7a7ajfhlwkHzczFjF9F4BvdRuun6Pd/eax/MCDzGzrfs5a7CwPBvD2YqNrYBFoQWBOIdgsfkXu/mkzmxber1IfLa6XDhGBGgm0UYpODFtSD+55MvTxYWI2JhM8BQD9g0bb3P0+ZvbooFzefST+WJOsWUfqZgC4VakmAlUQmONsTQvSrbokcJyTuPHskOT0JlUAkBAiIAKdCSQpRe7++LBl9vLOZ20+AH1Y3sLfMr6A4zbkEWa2p5ldpjmWKnqeEPy0ZlUPr0JACbF6BGZsoRHESQBopU1u0ZfoE1McrDmWts6SieoAEaiXQGOlKL7A6bdzpcLT4fYY624dC4DbdEvf3P2OIbrtBYzuGtFk6c91bwD/NSKZJeqSE3D3J8a6i9NmejSAg1MQuPudQkHrVwUr9TRr0A8AXCdlPPUVARGom0CKUsQcNbcrOB2Gx7/WzF4GgKHzK9fc/Ukh39PhIRHmFUcy+XP5sgDw55HIKzFXgMCcivacPT/sHgngrEUoQjTbs8yMStRkCP7aoY8AcMKicfR3ERCB8RBopBS5+4Fm9tJC0zo/bsm9euy+Qjn4uDtD+xnhcosc4/UwxqMBsLyLmghUQSBud/EjbrKi/Zp8v+R2WnjG3m1mTLz4w7U/RMsQgyL2nuFUvdY1a/mQKsBJCBEQAVuoFLk7ExMy30/uBIVMAvhiJn8EwOKjapGAu9NS9FYz22MEUBj9R2sR66SpiUAVBKJy85GGwtARm8lJmxaOzZb7qKF86iYCItATgSZKEUt4JO3DL5CdkUtUho4BwKgytSkE3J2O18fGKLXaGT0GwKtrF1LyrRaBmFfoZXMsRm2AfNDM9u0SydbmpDpGBESgHwJzlaKYk4iZoP8+gzg0UXMLjj5DyojcEKi7H2Nmj2vYfahu5zGbt6xFQ+HXeWcRiBYjWl03y0BJW2YZIGoIEaiZwCKlaL9Q2+u4jhOgWZph/LQMDZJfyN0ZMbd9LMPx25BXhPmORtGixejkGLZfs8z7AODLR00EqiLg7puGckTPM7O2KSRo3T4AAMsaqYmACCwxgUVKEUNRmWSwTaMDNU3X9BkaZJvM3ekjQCvLA83s79ZN4ikA/r3NpIY4xt03MjP6R7CmWq3tVABj8IGqlZ/kKkwgOmA/O0bRNrEcMU/aWwG8pLBoGl4ERKASAouUotPNbJdEWb9qZvQvee1QDtTxy5AL2V4zZL8wRHhdbyj5Enle0t3dtzUzlhkonSeqjXg85veRKVMrqIlA1QTittr9opDXDRZx/hixxkaXgbfJb6jqSyjhRKAIgUVKUVN/FpZ7eJ+ZvQ7AGUUkbTiou7MECS1Umyw4ZA8ApzYctopuCxLT1SDjIQCOqkEQySACIiACIiACqQQWKUUMw6efyK4TA1MJ+pqZnRkLs55Wg5Otuz8jyEnz+GUbgHgJgIMa9Kuqi7szy/dtqxLqr8J8ISiaO1Yqm8QSAREQAREQgbkEFobk8+gQAXVNM9vCzH5uZhcB+HVtXN2d2bAfmSDXBwDsltC/iq5BKWIR2dOqEGa6EFsCoD+ZWk8E4lbQXUJ5i6vGH7da2ViaYn02ZmZzXmvrt4rerq2ini6WTiMCIlA1gUZKUdUz+D+ljf5DT0iU83wAWyYeU0V3d2eulLtWIczfCqEM1z1cmKgIPczMqCTnqL/1DfrRmNkZAD46awpxC5cfSH2045uU41gvSHSmZtRsH+0COWH3gVnnEIH+CIxeKXL3p4TIshe2QPZ7AFdocdzgh7j77iES7T2DCzJdgLcAeEilso1aLHff08z+KUZP5VCEZvFghmf6CLKA6qVqhC2oK5ab7/1Sw+Ajo3fmFmTGeCwR0jQLdk8i6TQiIAJdCIxaKXL3h8Y6YU18iKZx2gLA97oAHOpYd/+OmV1/qPPPOe93ANygQrmSRHJ3OupzHvSr29jM6Ef3bTP7Vt/+c9H6wSzwk759SXNq2fnoUKD4qLXtNSlFl6JYnVIUE+7y3qXLA+9bfvhdzswub2bMkk/XB9Z++5WZ/SL+fjJU2pSW92TRw2Jeu6vFTOisn8f3JHldwg7Az4oKsEKDx3Qz3ObnOssk0SxxxeTOZM3781wAP+oTyWiVouhbw2RqXaw9OwCgs/joWriZ/s3MDqlU8K0BfLNS2aaK5e58aTCf1X3NjAVBbxgXw8n+f4q1ALnFRKvYx0vNM6aWoCX0n+dUai91+vXj8iX6rwBeKqVoeKUovkhYMJo/FpC+Xoj83Tz+ZhXBnXef8J5mLUo+s+ea2dkhncnXmQJkmasPuDu53dHMbm1mW8W0DORIhWhe4/PApMT8oOaH0ufM7ONjW/P6WDgmz+Hu3Hq/T3T/uGn88NxggSz8IOW9Sev1O0u/s0epFLn71sGXglFY/BLq0nYKztZrDqddxun9WHffIbzAv9T7iZudcD8Ar2/W9a+93P1jURlJPXTuAhYybd94VocYRPC0YAHilt81Wpz43gCLine truncated
|
||||
"created": 1721296075040,
|
||||
"lastRetrieved": 1721296075040
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 134 KiB |
|
Before Width: | Height: | Size: 138 KiB |
@@ -1,853 +0,0 @@
|
||||
{
|
||||
"type": "excalidraw",
|
||||
"version": 2,
|
||||
"source": "https://excalidraw.com",
|
||||
"elements": [
|
||||
{
|
||||
"id": "ZVmbn-ir2uHhJ_qUop7GE",
|
||||
"type": "image",
|
||||
"x": 669.690185546875,
|
||||
"y": -822.9161682128904,
|
||||
"width": 254.83337402343744,
|
||||
"height": 84.20964435722587,
|
||||
"angle": 0,
|
||||
"strokeColor": "transparent",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0f",
|
||||
"roundness": null,
|
||||
"seed": 873820286,
|
||||
"version": 722,
|
||||
"versionNonce": 1653069566,
|
||||
"isDeleted": false,
|
||||
"boundElements": [
|
||||
{
|
||||
"id": "3zLj8LrUzhGGXhZaDSJgs",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "YYmrmCN3zGtGeOPK2Ccbw",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295867729,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"status": "saved",
|
||||
"fileId": "daf9ace2f7f7a3f554f96c82cd99723eda6409d6",
|
||||
"scale": [
|
||||
1,
|
||||
1
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"type": "rectangle",
|
||||
"x": 536.4349670410156,
|
||||
"y": -677.1792297363279,
|
||||
"width": 178.43490600585935,
|
||||
"height": 44.315124511718736,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0g",
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"seed": 1579902398,
|
||||
"version": 443,
|
||||
"versionNonce": 523921598,
|
||||
"isDeleted": false,
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "rXvHMTDzQw3KXG5Bw6Miq"
|
||||
},
|
||||
{
|
||||
"id": "3zLj8LrUzhGGXhZaDSJgs",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "cKGXib4-dKdUl9yJcSfq-",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "BS019CDTkphQWLmagOrGS",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295852022,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "rXvHMTDzQw3KXG5Bw6Miq",
|
||||
"type": "text",
|
||||
"x": 564.0524749755859,
|
||||
"y": -667.5216674804685,
|
||||
"width": 123.19989013671875,
|
||||
"height": 25,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0gV",
|
||||
"roundness": null,
|
||||
"seed": 1207531362,
|
||||
"version": 342,
|
||||
"versionNonce": 538330338,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295807540,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"text": "Multi Agents",
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"originalText": "Multi Agents",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 725,
|
||||
"versionNonce": 1063769278,
|
||||
"index": "b0i",
|
||||
"isDeleted": false,
|
||||
"id": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 823.7187652587891,
|
||||
"y": -680.7326354980466,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 186.26303100585935,
|
||||
"height": 40.635437011718736,
|
||||
"seed": 1055936190,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"id": "YYmrmCN3zGtGeOPK2Ccbw",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"id": "Fnl1rz2BlXU6J8Yq8YZwu"
|
||||
},
|
||||
{
|
||||
"id": "e8q5v4IQp7HYVNQjKLNNS",
|
||||
"type": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "jBFbBBsN9eixvuKN38SL2",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295856562,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"id": "Fnl1rz2BlXU6J8Yq8YZwu",
|
||||
"type": "text",
|
||||
"x": 858.4403305053711,
|
||||
"y": -672.9149169921873,
|
||||
"width": 116.81990051269531,
|
||||
"height": 25,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0iV",
|
||||
"roundness": null,
|
||||
"seed": 594220962,
|
||||
"version": 142,
|
||||
"versionNonce": 1682602622,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295812159,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"text": "Single Agent",
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"originalText": "Single Agent",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "3zLj8LrUzhGGXhZaDSJgs",
|
||||
"type": "arrow",
|
||||
"x": 775.7563686946191,
|
||||
"y": -733.9083557128904,
|
||||
"width": 64.00441130704803,
|
||||
"height": 52.950469970703125,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0k",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 1611346302,
|
||||
"version": 799,
|
||||
"versionNonce": 1860218750,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295867729,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
-64.00441130704803,
|
||||
52.950469970703125
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "ZVmbn-ir2uHhJ_qUop7GE",
|
||||
"gap": 4.798168142774102,
|
||||
"focus": -0.19800863838720784
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"gap": 3.778656005859375,
|
||||
"focus": 0.47197049085398457
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "YYmrmCN3zGtGeOPK2Ccbw",
|
||||
"type": "arrow",
|
||||
"x": 810.3017634410855,
|
||||
"y": -732.6739807128904,
|
||||
"width": 85.77694061921636,
|
||||
"height": 44.679656982421875,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0l",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 412089534,
|
||||
"version": 775,
|
||||
"versionNonce": 1681745918,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295867729,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
85.77694061921636,
|
||||
44.679656982421875
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "ZVmbn-ir2uHhJ_qUop7GE",
|
||||
"gap": 6.032543142774102,
|
||||
"focus": 0.38025747349732314
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"gap": 7.261688232421875,
|
||||
"focus": 0.24350278296403458
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 752,
|
||||
"versionNonce": 1452690686,
|
||||
"index": "b0o",
|
||||
"isDeleted": false,
|
||||
"id": "nsG_S4C6dOJXv5Hn71Vpv",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 491.27333068847656,
|
||||
"y": -569.7236175537107,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 902159166,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "EDt610N0slRoDwCoDDSiH"
|
||||
},
|
||||
{
|
||||
"id": "cKGXib4-dKdUl9yJcSfq-",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295849323,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 535,
|
||||
"versionNonce": 1980346430,
|
||||
"index": "b0p",
|
||||
"isDeleted": false,
|
||||
"id": "EDt610N0slRoDwCoDDSiH",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 522.0554462645805,
|
||||
"y": -563.5003986210853,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 68.61994934082031,
|
||||
"height": 25,
|
||||
"seed": 2032386942,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295835808,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "CrewAI",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "nsG_S4C6dOJXv5Hn71Vpv",
|
||||
"originalText": "CrewAI",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 851,
|
||||
"versionNonce": 1844039998,
|
||||
"index": "b0q",
|
||||
"isDeleted": false,
|
||||
"id": "QCX8dp2PO9HkjqWidvhuK",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 648.4615867188858,
|
||||
"y": -569.9485283193521,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 555393982,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "hGN-D4W-BHfkd2cd-XnSP"
|
||||
},
|
||||
{
|
||||
"id": "BS019CDTkphQWLmagOrGS",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295852022,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 241,
|
||||
"versionNonce": 2015226750,
|
||||
"index": "b0r",
|
||||
"isDeleted": false,
|
||||
"id": "hGN-D4W-BHfkd2cd-XnSP",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 672.0937083985053,
|
||||
"y": -563.7253093867267,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 82.91993713378906,
|
||||
"height": 25,
|
||||
"seed": 533429246,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295841280,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "AutoGen",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "QCX8dp2PO9HkjqWidvhuK",
|
||||
"originalText": "AutoGen",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 768,
|
||||
"versionNonce": 1459025150,
|
||||
"index": "b0s",
|
||||
"isDeleted": false,
|
||||
"id": "7Ii8GSxtLkw5d3u_f-_kt",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 819.1223602294922,
|
||||
"y": -575.3343048095701,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 1314962402,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "nbS4zZL3SX1ojYnZ8ubj4"
|
||||
},
|
||||
{
|
||||
"id": "e8q5v4IQp7HYVNQjKLNNS",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295854370,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 546,
|
||||
"versionNonce": 1535924578,
|
||||
"index": "b0t",
|
||||
"isDeleted": false,
|
||||
"id": "nbS4zZL3SX1ojYnZ8ubj4",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 860.5144687865532,
|
||||
"y": -569.1110858769447,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 47.39996337890625,
|
||||
"height": 25,
|
||||
"seed": 1952640930,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295829009,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "Chat",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "7Ii8GSxtLkw5d3u_f-_kt",
|
||||
"originalText": "Chat",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"type": "rectangle",
|
||||
"version": 963,
|
||||
"versionNonce": 1521237310,
|
||||
"index": "b0u",
|
||||
"isDeleted": false,
|
||||
"id": "PqS5K_ghWhUe3nTiPZEWE",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 970.203835254042,
|
||||
"y": -574.8456535634928,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 130.18418049302826,
|
||||
"height": 37.446437865250886,
|
||||
"seed": 1265150818,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": {
|
||||
"type": 3
|
||||
},
|
||||
"boundElements": [
|
||||
{
|
||||
"type": "text",
|
||||
"id": "sCKqppUowczlf2-SGqYyT"
|
||||
},
|
||||
{
|
||||
"id": "jBFbBBsN9eixvuKN38SL2",
|
||||
"type": "arrow"
|
||||
}
|
||||
],
|
||||
"updated": 1721295856562,
|
||||
"link": null,
|
||||
"locked": false
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"version": 343,
|
||||
"versionNonce": 1701505250,
|
||||
"index": "b0v",
|
||||
"isDeleted": false,
|
||||
"id": "sCKqppUowczlf2-SGqYyT",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"angle": 0,
|
||||
"x": 1012.1559489990913,
|
||||
"y": -568.6224346308674,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"width": 46.27995300292969,
|
||||
"height": 25,
|
||||
"seed": 2042687266,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"roundness": null,
|
||||
"boundElements": [],
|
||||
"updated": 1721295829009,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"fontSize": 20,
|
||||
"fontFamily": 1,
|
||||
"text": "Code",
|
||||
"textAlign": "center",
|
||||
"verticalAlign": "middle",
|
||||
"containerId": "PqS5K_ghWhUe3nTiPZEWE",
|
||||
"originalText": "Code",
|
||||
"autoResize": true,
|
||||
"lineHeight": 1.25
|
||||
},
|
||||
{
|
||||
"id": "cKGXib4-dKdUl9yJcSfq-",
|
||||
"type": "arrow",
|
||||
"x": 627.2005615234375,
|
||||
"y": -630.5438232421873,
|
||||
"width": 60.1224365234375,
|
||||
"height": 55.1927490234375,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0w",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 233127038,
|
||||
"version": 98,
|
||||
"versionNonce": 1160484030,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295849323,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
-60.1224365234375,
|
||||
55.1927490234375
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"focus": -0.24888641301408482,
|
||||
"gap": 2.320281982421875
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "nsG_S4C6dOJXv5Hn71Vpv",
|
||||
"focus": -0.18497317396435772,
|
||||
"gap": 5.627456665039119
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "BS019CDTkphQWLmagOrGS",
|
||||
"type": "arrow",
|
||||
"x": 630.2474365234375,
|
||||
"y": -629.0698547363279,
|
||||
"width": 80.703125,
|
||||
"height": 53.463531494140625,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0x",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 310377790,
|
||||
"version": 80,
|
||||
"versionNonce": 799711486,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295852022,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
80.703125,
|
||||
53.463531494140625
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "gBkFdzkAVdEWutG3qTrB0",
|
||||
"focus": 0.28190124455103954,
|
||||
"gap": 3.79425048828125
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "QCX8dp2PO9HkjqWidvhuK",
|
||||
"focus": 0.366344355951018,
|
||||
"gap": 5.657794922835194
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "e8q5v4IQp7HYVNQjKLNNS",
|
||||
"type": "arrow",
|
||||
"x": 923.2083740234375,
|
||||
"y": -638.9448547363279,
|
||||
"width": 36.4427490234375,
|
||||
"height": 58.135406494140625,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0y",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 895023486,
|
||||
"version": 78,
|
||||
"versionNonce": 780221630,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295854370,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
-36.4427490234375,
|
||||
58.135406494140625
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"focus": -0.1871843733465698,
|
||||
"gap": 1.15234375
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "7Ii8GSxtLkw5d3u_f-_kt",
|
||||
"focus": -0.16423249726949576,
|
||||
"gap": 5.475143432617244
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
},
|
||||
{
|
||||
"id": "jBFbBBsN9eixvuKN38SL2",
|
||||
"type": "arrow",
|
||||
"x": 922.2291870117188,
|
||||
"y": -637.4943237304685,
|
||||
"width": 98.93487548828125,
|
||||
"height": 53.84375,
|
||||
"angle": 0,
|
||||
"strokeColor": "#1e1e1e",
|
||||
"backgroundColor": "transparent",
|
||||
"fillStyle": "solid",
|
||||
"strokeWidth": 2,
|
||||
"strokeStyle": "solid",
|
||||
"roughness": 1,
|
||||
"opacity": 100,
|
||||
"groupIds": [],
|
||||
"frameId": null,
|
||||
"index": "b0z",
|
||||
"roundness": {
|
||||
"type": 2
|
||||
},
|
||||
"seed": 277587262,
|
||||
"version": 96,
|
||||
"versionNonce": 1061850366,
|
||||
"isDeleted": false,
|
||||
"boundElements": null,
|
||||
"updated": 1721295856562,
|
||||
"link": null,
|
||||
"locked": false,
|
||||
"points": [
|
||||
[
|
||||
0,
|
||||
0
|
||||
],
|
||||
[
|
||||
98.93487548828125,
|
||||
53.84375
|
||||
]
|
||||
],
|
||||
"lastCommittedPoint": null,
|
||||
"startBinding": {
|
||||
"elementId": "hOUwrI2Zw6CbQVBzSj3j_",
|
||||
"focus": 0.2815822612188661,
|
||||
"gap": 2.602874755859375
|
||||
},
|
||||
"endBinding": {
|
||||
"elementId": "PqS5K_ghWhUe3nTiPZEWE",
|
||||
"focus": 0.3663457157233071,
|
||||
"gap": 8.804920166975819
|
||||
},
|
||||
"startArrowhead": null,
|
||||
"endArrowhead": "arrow"
|
||||
}
|
||||
],
|
||||
"appState": {
|
||||
"gridSize": null,
|
||||
"viewBackgroundColor": "#ffffff"
|
||||
},
|
||||
"files": {
|
||||
"daf9ace2f7f7a3f554f96c82cd99723eda6409d6": {
|
||||
"mimeType": "image/png",
|
||||
"id": "daf9ace2f7f7a3f554f96c82cd99723eda6409d6",
|
||||
"dataURL": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAkIAAAC/CAYAAAASNLPuAAAAAXNSR0IArs4c6QAAIABJREFUeF7tnQmcXEWZwOur7slMMjPJ9KvXmQAjTAIoRkQkCiiIIgIe4LV4i6gIHquu64G7IqwI4oW4i3jjhaCsqCygqFyCqCCICkLkCCGEAJnpqjeTZJLJzHS/b/tjO+wwme5+R73u92a++v3yG7Srvvrq/47+uuo7QHBjAkyACTABJsAEmMA8JQDzdN28bCbABJgAE2ACTIAJCDaE+CZgAkyACTABJsAE5i2BeWcIDQwMLNy+ffvThRD7+L6/FAAe/4eI9NcRQnQhYhf9FUIsBAAphNiGiOMAsF0IMY6I9Hc7/ZVSPv7/+b4/BACPCSEezefzj01NTT3ied5GIUR53t5dvHAmwASYABNgAiknMGcNoVWrVnU8+OCDe+dyuWcg4krf91cCwDOEEE8TQuRbdF3ICCLjaAMibpBS3oWId0kp7yyVSg8IIbBFevA0TIAJMAEmwASYwCwE5owhNDAw4ExMTLy4Uqm8REr5HEQko4d2dVLZEHGTlPIORPw7APw9l8vdMTQ09GfeQUrl5WKlmAATYAJMYI4SyLIhlC8UCgfncrkjhBBHIOLzWrjTk9TtYIQQNwghrgOA67TW9yU1EctlAkyACTABJsAERLacpR3HGUDElwPASwDgxUIINccv4hpEvC6Xy12PiL/SWm+Z4+vl5TEBJsAEmAATaCmB1O8IDQ4Odm3duvVVvu+/VQjx0jmw6xPpAgPAZkS8DBEv9jzvOiGEH0kQD2ICTIAJMAEmwASeIJBaQ6i/v/+gcrn8VgB4AyIW+Zr9PwEAeBAAflypVMgoWs1smAATCE6gWCzuPzU1taSvr++OdevWjQYfyT2ZABOYiwRSZQi5rruLEOItvu8fDwD7zUXgttdUPSb8PSJ+2RhzGUeh2abL8rJOoK+vbzCXyx0rhKB/R9ZZz33Vo/bfCSGu1FpfkfU1s/5MgAmEI5AKQ6hYLO6NiB9FxLelOdIrHNrW9kbEO6SUX9RaXyKEqLR2dp6NCaSLABlA+Xz+1GraineF1Oy+XC73meHh4QtDjuPuTIAJZJRAWw2hQqGwby6XO8X3/TcCQEdGGaZN7XsQ8YvLli27aPXq1ZNpU471YQJJE3Ac5xwA+EjMeW6VUr67VCr9LaYcHs4EmEDKCbTFEHJd9zm+759SzZ/zT0IIytzMzT4BSth4ijHm5/ZFs0QmkD4Cg4ODfZs3b/4WALzOhnYAUELEk4wxl9uQxzKYABNIJ4GWGkJLly59XqVS+YQQ4ph04piTWl1eLpf/ddOmTQ/OydXxopiAEIKMoC1btvxGCHGgbSBSyreXSqUf2JbL8pgAE0gHgZYYQoVCYfdcLncWIh6fjmXPLy2qxwRbEPHs/v7+c/m4bH5d+/myWsdxftJoJwgANCL+jZyiAWA9Ij5UTVz6AiHEHkKI/RDxuY1YSSmfzcdk8+Vu4nXONwKJGkK1AqcfF0J8BBF75hvctK0XEe/s6Og4eWho6E9p0431YQJRCTiO86Vqnq0P1xuPiOcuXrz4zEah8q7rvggRvyWE2Hs2OXRMVi6XDxwdHV0XVU8exwSYQDoJJGYIKaWo9MX5VOU9nUuft1qNk2FqjPn6vCXAC58zBGrh8fWOfe8HgJO11lS2pmmr+RidVs+oAoDvaK3DRqE1nZc7MAEm0F4C1g2h3XffvbB169YvCSHe0d6l8exNCFyYz+ffNzQ0tJVJMYGsEnBd9wJEPHEW/e/v7e09MErCRKXUB4UQ/zUbk0qlspx3hbJ6t7DeTGB2AlYNIaXUiwHg24i4goFngsBfAeBNWut7M6EtK8kEphFotBsEAIcH3QmaDapS6hohxEtmfoaIP/U8z0pUGl9MJsAE0kHAiiG0atWqjnXr1n2awrU5HD4dFzaEFiNCiOOMMdeHGMNdmUDbCdTbuSGfIM/zYuURomOysbGx+xHRnb5Q8hXSWi9t++JZASbABKwRiG0IdXd393d1dV0shCCfIG4ZJEBRZb7vH+d53tUZVJ9VnqcEHMe5FACOm7n83t7eQpQjsZly6hlacXeb5unl4mUzgdQSiGUILVu27MByuXwJIi5P7QpZsaAEtgHAG7XWVwYdwP2YQDsJKKVwlvmvNcbUqykWSt1aJNlvZw4CgNO11meGEsadmQATSC2ByIaQ67qUFPFHiNib2tWxYmEJbEfEt3qe97OwA7k/E2g1gdkMIRvHYtPXMdscbAi1+krzfEwgWQKRDCGl1Nsp5wbXB0v24rRDOiJOSSn/iXeG2kGf5wxKoJ6jtO0s0K7r3jpLskVru05B18v9mAATSI5AaEOIjCAhxHfYKTq5i5ICySO+7x82MjJyVwp0YRWYwE4EGhxbxYoWmzlRnegxNoT4nmQCc4hAKEOoWCweV6lUfpSRnSCKhnpECLERAIZ83x+mv0KIzYg4IaWc8H1/u5SSjoO2CyHQ9/1OKWUnAHQBQKfv+z0AUETEpYhYlFLS3z2FELvNoXug3lLunZycPHTLli16HqyVl5hBAq04tnJdd5ie/el4OLFiBm8WVpkJNCAQ2BAqFAqHSCkpt8bClBF9hGoICSEoF849vu/fWy6X/zE2NlZKSk9KGrl9+/Z9EPGplUplXynlwYj4HCFEV1JztknutYODgy+//fbbp9o0P0/LBOoSqOMjZC3PT73jN/YR4puSCcwtAoEMISqaKqX8Ywp2QnwA+Csi3uz7/p86OjpuHh4efiANl4Tqqo2NjR2Yz+cPE0K8smYYpUG1uDp8xRhDmXa5MYFUEVBK3TdLbbD7jDFPs6GoUupVQoj/mSnLth+SDV1ZBhNgAtEJNDWEBgcHu7Zs2UK1eg6KPk2skaOISPltfiOl/JXW+rFY0lo0uFgs7oWI9CJ9EyKuatG0iUyDiEd5nke7gdyYQGoI1Cu2aivPj1KK3js7heJzmY3U3AKsCBOwQqCpIaSUouKc77EyW0Ah1aKHm4UQlwPAJcVi8drVq1dPBhyaym59fX2H5fP5d1PSQgBYkEolGyt1v5TygFKpNJZB3VnlOUqgnsO0EOK+3t7eg+IkVWyQTPE2rfWBcxQpL4sJzEsCDQ0h13XfgogXtZDMtZVK5cKOjo7L5uKXbu2I8T+EEG8TQuRbyDX2VIj4Zc/zPhxbEAtgAhYJ1DkeEwBwgdb6pChTkW9QPp+nsPknOUmTLD4Wi0KUxzCBdBOoawjVvrT/IoRQCS9hVAjxQ0T8ZrWY4d0Jz5UK8UuXLn1WuVw+GwBengqFginh10Lq/xCsO/diAskTKBaLJ/i+//3ZZpJSnlYqlc4Ko0WxWNzf9/1vCiFm2/W53xjz1DDyuC8TYALpJ1DXEFJK/VoIcXRSSwCAB4UQ51cdsL+ttd6S1Dxplus4zjsB4BwhRCHNeu7QDQD+orWm6LjZShtkYQms4xwkUK9SfG2p11QqlZNHR0fXNVu6UuoDAHDabDtBtbGvNsZc3kwOf84EmEC2CMxqCPX19R2fy+UuTGgpd1Ea/GXLll2cdd8fG3yWLFmyPJ/Pf1cI8SIb8pKWIaV8falUujTpeVg+EwhKoHaUddvMSvHTDPiS7/sX+r5/ZV9f3x3TfYdoBwgA9qtUKm+dzTF6hwzbpTuCro37MQEmkDyBnQyhYrHY4/v+PQmEyv8jl8t9bnh4mCrVV5JfWnZmWLly5YLh4eELEPH4tGtNOZs8z6MoOD/turJ+84dA7UjrrwFXTGH3DzUyfKbLQURruYkC6sfdmAATaCGB2QyhU33fD3Wu3kTf+xHxc57n0Q5TuYVry9pUoJQ6Wwjxb2lXXEr5hlKp9JO068n6zS8ClPeHnKTr7QxFoUFG0OLFi0+KE4EWZV4ewwSYQOsIPMkQopxBY2NjDyLiMgsqPICIn1++fPn3OTNxcJqFQuEsKeWpwUe0vici3uF53gG8K9R69jxjYwK1nSEy0veOy4qPw+IS5PFMIBsEnmQIKaVeI4T4eUzV70XEc5YtW3Zhu3yA9tprr07P8/YCgL0RcZvneZQYLSuNdobIZ4iK26a2IeLLPM8jh3puTCBVBAYHB/s2b958WjUfWdR0D/cDwMlaa0oky40JMIE5TmCmIfTZGEczFPp+jjGG8g615QhMKfV0IcS7hRAnCCH6dlw7RDzR8zwyLjLRVq1a1bFu3bqrhBAvSavCAHCR1jr1Pk1p5cd6JU+g5kT9SUSksjdBdoiulVJeVCqVfpC8djwDE2ACaSEw0xCi3SDaFQrT/lit0P5VrfV/t8sJmn4Bjo2NfR4RT55NcQBYq7Wm/B+ZcdLu6+vbI5fL3d6CPE5hrvUTfQFgbPHixQNr167dFEkAD2ICLSRAR2aIeGxtyj0QcQ8A+B39bwBY393dfTn7AbXwgvBUTCBFBJ5kCIXwT3mEihECwHe11pR0sW3NcZyjAIASoA02UqKWDPCmtikaYeJGyeIiiLM+BBHf5Xned6wLZoFMgAkwASbABFpE4EmGEIXOVyqV7wLA62bMT4bPXyihXqVSuW5kZISyC7c9fFop9T5E/E8A6GjGCwBO11qf2axf2j5XSv1GCHFU2vSq6fNbY8yLU6obq8UEmAATYAJMoCmBWRMquq7bK4TYZXx8fPMuu+wysmbNmommklrcwXGcLwDAx4JOi4iXep73+qD909Kvv7//4HK5fHNa9Jmpx8TERP/Y2NhwWvWbi3rVIqNeIKVcUqlU+ighIK0TAOj4Z3p9rGt2rF9K+cQx0KJFi67gY6C5eGfwmpgAE4hCoGn1+ShCkx7juu7piHhGyHnuMsY8M+SYVHRXSv1MCPHaVCgzQwnONN2aq0LGD2U/BgDyc7FR7+pWIcRFUsqbSqXS3+qtgo5nhRBPacUqp6amLgpSCmO6LuQQ3dHRQVmhW9EeZkfqVmDmOZhAawlkzhByHOdESpoWFhM592qLine truncated
|
||||
"created": 1721295668118,
|
||||
"lastRetrieved": 1721295668118
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 6.4 KiB |
|
Before Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 5.9 KiB |
|
Before Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 9.7 KiB |
|
Before Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 14 KiB |
|
Before Width: | Height: | Size: 126 KiB |
|
Before Width: | Height: | Size: 183 KiB |
|
Before Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 128 KiB |
|
Before Width: | Height: | Size: 99 KiB |
|
Before Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 98 KiB |
|
Before Width: | Height: | Size: 137 KiB |
|
Before Width: | Height: | Size: 179 KiB |
@@ -1,82 +0,0 @@
|
||||
# Praison AI
|
||||
|
||||
<p align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="overrides/images/praisonai-logo-dark.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="overrides/images/praisonai-logo-light.png">
|
||||
<img alt="PraisonAI Logo" src="overrides/images/praisonai-logo-light.png">
|
||||
</picture>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://static.pepy.tech/badge/PraisonAI" alt="Total Downloads"></a>
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/github/v/release/MervinPraison/PraisonAI" alt="Latest Stable Version"></a>
|
||||
<a href="https://github.com/MervinPraison/PraisonAI"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License"></a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
|
||||
</div>
|
||||
|
||||
Praison AI, leveraging both AutoGen and CrewAI or any other agent framework, represents a low-code, centralised framework designed to simplify the creation and orchestration of multi-agent systems for various LLM applications, emphasizing ease of use, customization, and human-agent interaction.
|
||||
|
||||
<div align="center">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="images/architecture-dark.png">
|
||||
<source media="(prefers-color-scheme: light)" srcset="images/architecture-light.png">
|
||||
<img alt="PraisonAI Architecture" src="images/architecture-dark.png">
|
||||
</picture>
|
||||
</div>
|
||||
|
||||
## Different User Interfaces:
|
||||
|
||||
| Interface | Description | URL |
|
||||
|---|---|---|
|
||||
| **UI** | Multi Agents such as CrewAI or AutoGen | [https://docs.praison.ai/ui/ui](https://docs.praison.ai/ui/ui) |
|
||||
| **Chat** | Chat with 100+ LLMs, single AI Agent | [https://docs.praison.ai/ui/chat](https://docs.praison.ai/ui/chat) |
|
||||
| **Code** | Chat with entire Codebase, single AI Agent | [https://docs.praison.ai/ui/code](https://docs.praison.ai/ui/code) |
|
||||
|
||||
## Google Colab Multi Agents
|
||||
|
||||
| | Cookbook | Open in Colab |
|
||||
| ------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| Basic | PraisonAI | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
||||
| Include Tools | PraisonAI Tools | <a target="_blank" href="https://colab.research.google.com/github/MervinPraison/PraisonAI/blob/main/cookbooks/praisonai-tools-googlecolab.ipynb"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a> |
|
||||
|
||||
## Install
|
||||
|
||||
| PraisonAI | PraisonAI Code | PraisonAI Chat |
|
||||
| --- | --- | --- |
|
||||
| `pip install praisonai` | `pip install "praisonai[code]"` | `pip install "praisonai[chat]"` |
|
||||
|
||||
## TL;DR Multi Agents
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
praisonai --init create a movie script about dog in moon
|
||||
praisonai
|
||||
```
|
||||
|
||||
## Prerequisite:
|
||||
### Export API KEY
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
```
|
||||
|
||||
## Automatically Create Agents to Perform a Task
|
||||
|
||||
```bash
|
||||
praisonai --init create a movie script about dog in moon
|
||||
```
|
||||
## Run
|
||||
```bash
|
||||
praisonai
|
||||
```
|
||||
@@ -1,20 +0,0 @@
|
||||
.. PraisonAI documentation master file, created by
|
||||
sphinx-quickstart on Mon Jun 10 12:11:57 2024.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to PraisonAI's documentation!
|
||||
=====================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
@@ -1,14 +0,0 @@
|
||||
# Initialise
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY="Enter your API key"
|
||||
```
|
||||
|
||||
Generate your OPENAI API KEY from here: https://platform.openai.com/api-keys
|
||||
|
||||
Note: You can use other providers such as Ollama, Mistral ... etc. Details are provided at the bottom.
|
||||
|
||||
```bash
|
||||
praisonai --init create a movie script about dog in moon
|
||||
```
|
||||
This will automatically create agents.yaml file in the current directory.
|
||||
@@ -1,5 +0,0 @@
|
||||
# Installation
|
||||
|
||||
```bash
|
||||
pip install praisonai
|
||||
```
|
||||
@@ -1,35 +0,0 @@
|
||||
@ECHO OFF
|
||||
|
||||
pushd %~dp0
|
||||
|
||||
REM Command file for Sphinx documentation
|
||||
|
||||
if "%SPHINXBUILD%" == "" (
|
||||
set SPHINXBUILD=sphinx-build
|
||||
)
|
||||
set SOURCEDIR=.
|
||||
set BUILDDIR=_build
|
||||
|
||||
%SPHINXBUILD% >NUL 2>NUL
|
||||
if errorlevel 9009 (
|
||||
echo.
|
||||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
||||
echo.installed, then set the SPHINXBUILD environment variable to point
|
||||
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
||||
echo.may add the Sphinx directory to PATH.
|
||||
echo.
|
||||
echo.If you don't have Sphinx installed, grab it from
|
||||
echo.https://www.sphinx-doc.org/
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
if "%1" == "" goto help
|
||||
|
||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
goto end
|
||||
|
||||
:help
|
||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
||||
|
||||
:end
|
||||
popd
|
||||
@@ -1,71 +0,0 @@
|
||||
# Models in PraisonAI
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | Below Models |
|
||||
|
||||
- [OpenAI](models/openai.md)
|
||||
- [Groq](models/groq.md)
|
||||
- [Google Gemini](models/google.md)
|
||||
- [Anthropic Claude](models/anthropic.md)
|
||||
- [Cohere](models/cohere.md)
|
||||
- [Mistral](models/mistral.md)
|
||||
- [Ollama](models/ollama.md)
|
||||
- [Other Models](models/other.md)
|
||||
|
||||
|
||||
## Example agents.yaml
|
||||
|
||||
This uses Multi-Agents with Multi-LLMs.
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: research about the causes of lung disease
|
||||
roles:
|
||||
research_analyst:
|
||||
backstory: Experienced in analyzing scientific data related to respiratory health.
|
||||
goal: Analyze data on lung diseases
|
||||
role: Research Analyst
|
||||
llm:
|
||||
model: "groq/llama3-70b-8192"
|
||||
function_calling_llm:
|
||||
model: "google/gemini-1.5-flash-001"
|
||||
tasks:
|
||||
data_analysis:
|
||||
description: Gather and analyze data on the causes and risk factors of lung
|
||||
diseases.
|
||||
expected_output: Report detailing key findings on lung disease causes.
|
||||
tools:
|
||||
- 'InternetSearchTool'
|
||||
medical_writer:
|
||||
backstory: Skilled in translating complex medical information into accessible
|
||||
content.
|
||||
goal: Compile comprehensive content on lung disease causes
|
||||
role: Medical Writer
|
||||
llm:
|
||||
model: "anthropic/claude-3-haiku-20240307"
|
||||
function_calling_llm:
|
||||
model: "openai/gpt-4o"
|
||||
tasks:
|
||||
content_creation:
|
||||
description: Create detailed content summarizing the research findings on
|
||||
lung disease causes.
|
||||
expected_output: Document outlining various causes and risk factors of lung
|
||||
diseases.
|
||||
tools:
|
||||
- ''
|
||||
editor:
|
||||
backstory: Proficient in editing medical content for accuracy and clarity.
|
||||
goal: Review and refine content on lung disease causes
|
||||
role: Editor
|
||||
llm:
|
||||
model: "cohere/command-r"
|
||||
tasks:
|
||||
content_review:
|
||||
description: Edit and refine the compiled content on lung disease causes for
|
||||
accuracy and coherence.
|
||||
expected_output: Finalized document on lung disease causes ready for dissemination.
|
||||
tools:
|
||||
- ''
|
||||
dependencies: []
|
||||
```
|
||||
@@ -1,35 +0,0 @@
|
||||
# Add Anthropic to Praison AI
|
||||
|
||||
```bash
|
||||
pip install langchain-anthropic
|
||||
```
|
||||
```bash
|
||||
export ANTHROPIC_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "anthropic/claude-3-haiku-20240307"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,35 +0,0 @@
|
||||
# Add COHERE to Praison AI
|
||||
|
||||
```bash
|
||||
pip install langchain-cohere
|
||||
```
|
||||
```bash
|
||||
export COHERE_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "cohere/command-r"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,35 +0,0 @@
|
||||
# Add Google Gemini to Praison AI
|
||||
|
||||
```bash
|
||||
pip install langchain-google-genai
|
||||
```
|
||||
```bash
|
||||
export GOOGLE_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "google/gemini-1.5-flash-001"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,32 +0,0 @@
|
||||
# Add GROQ to Praison AI
|
||||
|
||||
```bash
|
||||
export GROQ_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "groq/llama3-70b-8192"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,36 +0,0 @@
|
||||
# Add Mistral to Praison AI
|
||||
|
||||
Note: If you want to use Mistral via Ollama, please refer to Ollama document. This is for using Mistral from https://mistral.ai
|
||||
|
||||
## Using Single Agent
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=xxxxxxxxxx
|
||||
export OPENAI_MODEL_NAME=mistral-large
|
||||
export OPENAI_API_BASE="https://api.mistral.ai/v1"
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,28 +0,0 @@
|
||||
# Add Ollama to Praison AI
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "ollama/llama3"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,89 +0,0 @@
|
||||
# Add OPENAI ChatGPT to Praison AI
|
||||
|
||||
## Using Single Agent
|
||||
|
||||
```bash
|
||||
export OPENAI_API_KEY=xxxxxxxxxx
|
||||
export OPENAI_MODEL_NAME=gpt-4o
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
You can also mention the model name in the agents.yaml file
|
||||
|
||||
### agents.yaml file
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "gpt-4o"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
|
||||
## Using Multi Agents
|
||||
|
||||
```bash
|
||||
pip install langchain-openai
|
||||
```
|
||||
```bash
|
||||
export OPENAI_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "openai/gpt-4o"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,32 +0,0 @@
|
||||
# Add OpenRouter to Praison AI
|
||||
|
||||
```bash
|
||||
export OPENROUTER_API_KEY=xxxxxxxxxx
|
||||
```
|
||||
|
||||
### agents.yaml file
|
||||
|
||||
```yaml
|
||||
framework: crewai
|
||||
topic: create movie script about cat in mars
|
||||
roles:
|
||||
researcher:
|
||||
backstory: Skilled in finding and organizing information, with a focus on research
|
||||
efficiency.
|
||||
goal: Gather information about Mars and cats
|
||||
role: Researcher
|
||||
llm:
|
||||
model: "openrouter/anthropic/claude-3.5-sonnet"
|
||||
tasks:
|
||||
gather_research:
|
||||
description: Research and gather information about Mars, its environment,
|
||||
and cats, including their behavior and characteristics.
|
||||
expected_output: Document with research findings, including interesting facts
|
||||
and information.
|
||||
tools:
|
||||
- ''
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,27 +0,0 @@
|
||||
# Other Models
|
||||
|
||||
```bash
|
||||
# Ollama
|
||||
OPENAI_API_BASE='http://localhost:11434/v1'
|
||||
OPENAI_MODEL_NAME='mistral'
|
||||
OPENAI_API_KEY='NA'
|
||||
|
||||
# FastChat
|
||||
OPENAI_API_BASE="http://localhost:8001/v1"
|
||||
OPENAI_MODEL_NAME='oh-2.5m7b-q51'
|
||||
OPENAI_API_KEY=NA
|
||||
|
||||
# LM Studio
|
||||
OPENAI_API_BASE="http://localhost:1234/v1"
|
||||
OPENAI_MODEL_NAME=NA
|
||||
OPENAI_API_KEY=NA
|
||||
|
||||
# Mistral API
|
||||
OPENAI_API_BASE=https://api.mistral.ai/v1
|
||||
OPENAI_MODEL_NAME="mistral-small"
|
||||
OPENAI_API_KEY=your-mistral-api-key
|
||||
```
|
||||
|
||||
| PraisonAI Chat | PraisonAI Code | PraisonAI (Multi-Agents) |
|
||||
| --- | --- | --- |
|
||||
| [Litellm](https://litellm.vercel.app/docs/providers) | [Litellm](https://litellm.vercel.app/docs/providers) | [Models](../models.md) |
|
||||
@@ -1,13 +0,0 @@
|
||||
# AgentOps PraisonAI Monitoring
|
||||
|
||||
```bash
|
||||
pip install "praisonai[agentops]"
|
||||
```
|
||||
|
||||
```bash
|
||||
export AGENTOPS_API_KEY=xxxxxxxx
|
||||
```
|
||||
|
||||
## Dashboard
|
||||
|
||||

|
||||
@@ -1,11 +0,0 @@
|
||||
@media (prefers-color-scheme: dark) {
|
||||
.md-header__logo img {
|
||||
content: url('../images/praisonai-logo-dark.png');
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: light) {
|
||||
.md-header__logo img {
|
||||
content: url('../images/praisonai-logo-light.png');
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 9.7 KiB |