semantio 0.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- semantio-0.0.1/LICENSE +21 -0
- semantio-0.0.1/PKG-INFO +145 -0
- semantio-0.0.1/README.md +124 -0
- semantio-0.0.1/semantio/__init__.py +0 -0
- semantio-0.0.1/semantio/agent.py +608 -0
- semantio-0.0.1/semantio/api/__init__.py +0 -0
- semantio-0.0.1/semantio/api/api_generator.py +23 -0
- semantio-0.0.1/semantio/api/fastapi_app.py +70 -0
- semantio-0.0.1/semantio/cli/__init__.py +0 -0
- semantio-0.0.1/semantio/cli/main.py +31 -0
- semantio-0.0.1/semantio/knowledge_base/__init__.py +5 -0
- semantio-0.0.1/semantio/knowledge_base/document_loader.py +61 -0
- semantio-0.0.1/semantio/knowledge_base/retriever.py +41 -0
- semantio-0.0.1/semantio/knowledge_base/vector_store.py +35 -0
- semantio-0.0.1/semantio/llm/__init__.py +17 -0
- semantio-0.0.1/semantio/llm/anthropic.py +39 -0
- semantio-0.0.1/semantio/llm/base_llm.py +12 -0
- semantio-0.0.1/semantio/llm/groq.py +39 -0
- semantio-0.0.1/semantio/llm/llama.py +0 -0
- semantio-0.0.1/semantio/llm/openai.py +26 -0
- semantio-0.0.1/semantio/memory.py +11 -0
- semantio-0.0.1/semantio/rag.py +18 -0
- semantio-0.0.1/semantio/storage/__init__.py +0 -0
- semantio-0.0.1/semantio/storage/cloud_storage.py +0 -0
- semantio-0.0.1/semantio/storage/local_storage.py +0 -0
- semantio-0.0.1/semantio/tools/__init__.py +0 -0
- semantio-0.0.1/semantio/tools/base_tool.py +12 -0
- semantio-0.0.1/semantio/tools/crypto.py +133 -0
- semantio-0.0.1/semantio/tools/duckduckgo.py +128 -0
- semantio-0.0.1/semantio/tools/stocks.py +131 -0
- semantio-0.0.1/semantio/tools/web_browser.py +153 -0
- semantio-0.0.1/semantio/utils/__init__.py +7 -0
- semantio-0.0.1/semantio/utils/config.py +41 -0
- semantio-0.0.1/semantio/utils/date_utils.py +44 -0
- semantio-0.0.1/semantio/utils/file_utils.py +56 -0
- semantio-0.0.1/semantio/utils/logger.py +20 -0
- semantio-0.0.1/semantio/utils/validation_utils.py +44 -0
- semantio-0.0.1/semantio.egg-info/PKG-INFO +145 -0
- semantio-0.0.1/semantio.egg-info/SOURCES.txt +43 -0
- semantio-0.0.1/semantio.egg-info/dependency_links.txt +1 -0
- semantio-0.0.1/semantio.egg-info/entry_points.txt +3 -0
- semantio-0.0.1/semantio.egg-info/requires.txt +18 -0
- semantio-0.0.1/semantio.egg-info/top_level.txt +1 -0
- semantio-0.0.1/setup.cfg +4 -0
- semantio-0.0.1/setup.py +48 -0
semantio-0.0.1/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Syenah
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
semantio-0.0.1/PKG-INFO
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: semantio
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A powerful SDK for building AI agents with RAG capabilities.
|
|
5
|
+
Home-page: https://github.com/Syenah/semantio
|
|
6
|
+
Author: Rakesh
|
|
7
|
+
Author-email: rakeshsahoo689@gmail.com
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Platform: UNKNOWN
|
|
10
|
+
Classifier: Development Status :: 3 - Alpha
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
16
|
+
Requires-Python: >=3.8
|
|
17
|
+
Description-Content-Type: text/markdown
|
|
18
|
+
License-File: LICENSE
|
|
19
|
+
|
|
20
|
+
# Semantio: The Mother of Your AI Agents
|
|
21
|
+
|
|
22
|
+
Semantio is an advanced SDK designed to simplify the creation of AI agents. Whether you’re building a research agent, a customer support bot, or a personal AI, Semantio provides all the tools and integrations to make it easy.
|
|
23
|
+
|
|
24
|
+
We currently support **Groq**, **OpenAI**, and **Anthropic** LLMs, along with a Retrieval-Augmented Generation (RAG) system for enhanced context-awareness.
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
Install Semantio via pip:
|
|
28
|
+
```bash
|
|
29
|
+
pip install semantio
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Features
|
|
33
|
+
- **Seamless LLM Integration**: Plug-and-play support for Groq, OpenAI, and Anthropic.
|
|
34
|
+
- **RAG Support**: Retrieval-Augmented Generation for contextually aware responses.
|
|
35
|
+
- **Customizable Agents**: Define the personality, behavior, and instructions for your AI agents.
|
|
36
|
+
- **Extensibility**: Add new tools or modify behavior with ease.
|
|
37
|
+
|
|
38
|
+
## Example: Blockchain Research Agent
|
|
39
|
+
This example demonstrates how to create a blockchain research agent using Semantio and the Groq LLM.
|
|
40
|
+
|
|
41
|
+
### Prerequisites
|
|
42
|
+
1. Set up your Groq API key as an environment variable or directly in the code.
|
|
43
|
+
|
|
44
|
+
```python
|
|
45
|
+
import os
|
|
46
|
+
os.environ["GROQ_API_KEY"] = "your-api-key" # Replace with your Groq API key
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
2. Import the Semantio Agent class and configure your agent.
|
|
50
|
+
|
|
51
|
+
### Code Example
|
|
52
|
+
```python
|
|
53
|
+
# Set the Groq API key (either via environment variable or explicitly)
|
|
54
|
+
import os
|
|
55
|
+
os.environ["GROQ_API_KEY"] = "your-api-key" # Set the API key here
|
|
56
|
+
|
|
57
|
+
# Initialize the Agent
|
|
58
|
+
from semantio.agent import Agent
|
|
59
|
+
|
|
60
|
+
healthcare_research_assistant = Agent(
|
|
61
|
+
name="Healthcare Agent",
|
|
62
|
+
description="Extract and structure medical information from the provided text into a JSON format used in healthcare",
|
|
63
|
+
instructions=[
|
|
64
|
+
"Always use medical terminology while creating json",
|
|
65
|
+
"Extract and structure medical information from the provided text into a JSON format used in healthcare",
|
|
66
|
+
],
|
|
67
|
+
model="Groq",
|
|
68
|
+
show_tool_calls=True,
|
|
69
|
+
user_name="Researcher",
|
|
70
|
+
emoji=":chains:",
|
|
71
|
+
markdown=True,
|
|
72
|
+
)
|
|
73
|
+
patient_text = """
|
|
74
|
+
Patient Complaints of High grade fever, chest pain, radiating towards right shoulder. Sweating,
|
|
75
|
+
patient seams to have high grade fever , patient is allergic to pollution , diagnosis high grade fever , plan of care comeback after 2 days , instructions take rest and drink lot of water Palpitation since 5 days.
|
|
76
|
+
Advice investigation: CBC, LFT, Chest X ray, Abdomen Ultrasound
|
|
77
|
+
Medication: Diclofenac 325mg twice a day for 5 days, Amoxiclave 625mg once a day for 5 days, Azithromycin 500mg Once a day
|
|
78
|
+
Ibuprofen SOS, Paracetamol sos, Pentoprazol before breakfast , follow up after 2 days
|
|
79
|
+
"""
|
|
80
|
+
# Test the Agent
|
|
81
|
+
healthcare_research_assistant.print_response(patient_text)
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## File Structure
|
|
85
|
+
The Semantio SDK is organized as follows:
|
|
86
|
+
```
|
|
87
|
+
Semantio/
|
|
88
|
+
├── semantio/ # Core package
|
|
89
|
+
│ ├── __init__.py # Package initialization
|
|
90
|
+
│ ├── agent.py # Core Agent class
|
|
91
|
+
│ ├── rag.py # RAG functionality
|
|
92
|
+
│ ├── memory.py # Conversation memory management
|
|
93
|
+
│ ├── llm/ # LLM integrations
|
|
94
|
+
│ │ ├── __init__.py
|
|
95
|
+
│ │ ├── openai.py # OpenAI integration
|
|
96
|
+
│ │ ├── anthropic.py # Anthropic (Claude) integration
|
|
97
|
+
│ │ ├── llama.py # Llama 2 integration
|
|
98
|
+
│ │ └── base_llm.py # Base class for LLMs
|
|
99
|
+
│ ├── knowledge_base/ # Knowledge base integration
|
|
100
|
+
│ │ ├── __init__.py
|
|
101
|
+
│ │ ├── vector_store.py # Vector store for embeddings
|
|
102
|
+
│ │ ├── document_loader.py # Load documents into the knowledge base
|
|
103
|
+
│ │ └── retriever.py # Retrieve relevant documents
|
|
104
|
+
│ ├── tools/ # Tools for assistants
|
|
105
|
+
│ │ ├── __init__.py
|
|
106
|
+
│ │ ├── calculator.py # Example tool: Calculator
|
|
107
|
+
│ │ ├── web_search.py # Example tool: Web search
|
|
108
|
+
│ │ └── base_tool.py # Base class for tools
|
|
109
|
+
│ ├── storage/ # Storage for memory and data
|
|
110
|
+
│ │ ├── __init__.py
|
|
111
|
+
│ │ ├── local_storage.py # Local file storage
|
|
112
|
+
│ │ └── cloud_storage.py # Cloud storage (e.g., S3, GCP)
|
|
113
|
+
│ ├── utils/ # Utility functions
|
|
114
|
+
│ │ ├── __init__.py
|
|
115
|
+
│ │ ├── logger.py # Logging utility
|
|
116
|
+
│ │ └── config.py # Configuration loader
|
|
117
|
+
│ └── cli/ # Command-line interface
|
|
118
|
+
│ ├── __init__.py
|
|
119
|
+
│ └── main.py # CLI entry point
|
|
120
|
+
├── tests/ # Unit tests
|
|
121
|
+
│ ├── __init__.py
|
|
122
|
+
│ ├── test_assistant.py
|
|
123
|
+
│ ├── test_rag.py
|
|
124
|
+
│ └── test_memory.py
|
|
125
|
+
├── examples/ # Example usage
|
|
126
|
+
│ ├── basic_assistant.py
|
|
127
|
+
│ ├── customer_support.py
|
|
128
|
+
│ └── research_assistant.py
|
|
129
|
+
├── requirements.txt # Dependencies
|
|
130
|
+
├── setup.py # Installation script
|
|
131
|
+
├── README.md # Documentation
|
|
132
|
+
└── LICENSE # License file
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Contributing
|
|
136
|
+
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request with a detailed description of your changes.
|
|
137
|
+
|
|
138
|
+
## License
|
|
139
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
140
|
+
|
|
141
|
+
## Support
|
|
142
|
+
For issues, feature requests, or questions, please open an issue in the repository or reach out to the team.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
semantio-0.0.1/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# Semantio: The Mother of Your AI Agents
|
|
2
|
+
|
|
3
|
+
Semantio is an advanced SDK designed to simplify the creation of AI agents. Whether you’re building a research agent, a customer support bot, or a personal AI, Semantio provides all the tools and integrations to make it easy.
|
|
4
|
+
|
|
5
|
+
We currently support **Groq**, **OpenAI**, and **Anthropic** LLMs, along with a Retrieval-Augmented Generation (RAG) system for enhanced context-awareness.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
Install Semantio via pip:
|
|
9
|
+
```bash
|
|
10
|
+
pip install semantio
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
- **Seamless LLM Integration**: Plug-and-play support for Groq, OpenAI, and Anthropic.
|
|
15
|
+
- **RAG Support**: Retrieval-Augmented Generation for contextually aware responses.
|
|
16
|
+
- **Customizable Agents**: Define the personality, behavior, and instructions for your AI agents.
|
|
17
|
+
- **Extensibility**: Add new tools or modify behavior with ease.
|
|
18
|
+
|
|
19
|
+
## Example: Blockchain Research Agent
|
|
20
|
+
This example demonstrates how to create a blockchain research agent using Semantio and the Groq LLM.
|
|
21
|
+
|
|
22
|
+
### Prerequisites
|
|
23
|
+
1. Set up your Groq API key as an environment variable or directly in the code.
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
import os
|
|
27
|
+
os.environ["GROQ_API_KEY"] = "your-api-key" # Replace with your Groq API key
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
2. Import the Semantio Agent class and configure your agent.
|
|
31
|
+
|
|
32
|
+
### Code Example
|
|
33
|
+
```python
|
|
34
|
+
# Set the Groq API key (either via environment variable or explicitly)
|
|
35
|
+
import os
|
|
36
|
+
os.environ["GROQ_API_KEY"] = "your-api-key" # Set the API key here
|
|
37
|
+
|
|
38
|
+
# Initialize the Agent
|
|
39
|
+
from semantio.agent import Agent
|
|
40
|
+
|
|
41
|
+
healthcare_research_assistant = Agent(
|
|
42
|
+
name="Healthcare Agent",
|
|
43
|
+
description="Extract and structure medical information from the provided text into a JSON format used in healthcare",
|
|
44
|
+
instructions=[
|
|
45
|
+
"Always use medical terminology while creating json",
|
|
46
|
+
"Extract and structure medical information from the provided text into a JSON format used in healthcare",
|
|
47
|
+
],
|
|
48
|
+
model="Groq",
|
|
49
|
+
show_tool_calls=True,
|
|
50
|
+
user_name="Researcher",
|
|
51
|
+
emoji=":chains:",
|
|
52
|
+
markdown=True,
|
|
53
|
+
)
|
|
54
|
+
patient_text = """
|
|
55
|
+
Patient Complaints of High grade fever, chest pain, radiating towards right shoulder. Sweating,
|
|
56
|
+
patient seams to have high grade fever , patient is allergic to pollution , diagnosis high grade fever , plan of care comeback after 2 days , instructions take rest and drink lot of water Palpitation since 5 days.
|
|
57
|
+
Advice investigation: CBC, LFT, Chest X ray, Abdomen Ultrasound
|
|
58
|
+
Medication: Diclofenac 325mg twice a day for 5 days, Amoxiclave 625mg once a day for 5 days, Azithromycin 500mg Once a day
|
|
59
|
+
Ibuprofen SOS, Paracetamol sos, Pentoprazol before breakfast , follow up after 2 days
|
|
60
|
+
"""
|
|
61
|
+
# Test the Agent
|
|
62
|
+
healthcare_research_assistant.print_response(patient_text)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## File Structure
|
|
66
|
+
The Semantio SDK is organized as follows:
|
|
67
|
+
```
|
|
68
|
+
Semantio/
|
|
69
|
+
├── semantio/ # Core package
|
|
70
|
+
│ ├── __init__.py # Package initialization
|
|
71
|
+
│ ├── agent.py # Core Agent class
|
|
72
|
+
│ ├── rag.py # RAG functionality
|
|
73
|
+
│ ├── memory.py # Conversation memory management
|
|
74
|
+
│ ├── llm/ # LLM integrations
|
|
75
|
+
│ │ ├── __init__.py
|
|
76
|
+
│ │ ├── openai.py # OpenAI integration
|
|
77
|
+
│ │ ├── anthropic.py # Anthropic (Claude) integration
|
|
78
|
+
│ │ ├── llama.py # Llama 2 integration
|
|
79
|
+
│ │ └── base_llm.py # Base class for LLMs
|
|
80
|
+
│ ├── knowledge_base/ # Knowledge base integration
|
|
81
|
+
│ │ ├── __init__.py
|
|
82
|
+
│ │ ├── vector_store.py # Vector store for embeddings
|
|
83
|
+
│ │ ├── document_loader.py # Load documents into the knowledge base
|
|
84
|
+
│ │ └── retriever.py # Retrieve relevant documents
|
|
85
|
+
│ ├── tools/ # Tools for assistants
|
|
86
|
+
│ │ ├── __init__.py
|
|
87
|
+
│ │ ├── calculator.py # Example tool: Calculator
|
|
88
|
+
│ │ ├── web_search.py # Example tool: Web search
|
|
89
|
+
│ │ └── base_tool.py # Base class for tools
|
|
90
|
+
│ ├── storage/ # Storage for memory and data
|
|
91
|
+
│ │ ├── __init__.py
|
|
92
|
+
│ │ ├── local_storage.py # Local file storage
|
|
93
|
+
│ │ └── cloud_storage.py # Cloud storage (e.g., S3, GCP)
|
|
94
|
+
│ ├── utils/ # Utility functions
|
|
95
|
+
│ │ ├── __init__.py
|
|
96
|
+
│ │ ├── logger.py # Logging utility
|
|
97
|
+
│ │ └── config.py # Configuration loader
|
|
98
|
+
│ └── cli/ # Command-line interface
|
|
99
|
+
│ ├── __init__.py
|
|
100
|
+
│ └── main.py # CLI entry point
|
|
101
|
+
├── tests/ # Unit tests
|
|
102
|
+
│ ├── __init__.py
|
|
103
|
+
│ ├── test_assistant.py
|
|
104
|
+
│ ├── test_rag.py
|
|
105
|
+
│ └── test_memory.py
|
|
106
|
+
├── examples/ # Example usage
|
|
107
|
+
│ ├── basic_assistant.py
|
|
108
|
+
│ ├── customer_support.py
|
|
109
|
+
│ └── research_assistant.py
|
|
110
|
+
├── requirements.txt # Dependencies
|
|
111
|
+
├── setup.py # Installation script
|
|
112
|
+
├── README.md # Documentation
|
|
113
|
+
└── LICENSE # License file
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Contributing
|
|
117
|
+
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request with a detailed description of your changes.
|
|
118
|
+
|
|
119
|
+
## License
|
|
120
|
+
This project is licensed under the [MIT License](LICENSE).
|
|
121
|
+
|
|
122
|
+
## Support
|
|
123
|
+
For issues, feature requests, or questions, please open an issue in the repository or reach out to the team.
|
|
124
|
+
|
|
File without changes
|