semantio 0.0.1__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- semantio/__init__.py +0 -0
- semantio/agent.py +608 -0
- semantio/api/__init__.py +0 -0
- semantio/api/api_generator.py +23 -0
- semantio/api/fastapi_app.py +70 -0
- semantio/cli/__init__.py +0 -0
- semantio/cli/main.py +31 -0
- semantio/knowledge_base/__init__.py +5 -0
- semantio/knowledge_base/document_loader.py +61 -0
- semantio/knowledge_base/retriever.py +41 -0
- semantio/knowledge_base/vector_store.py +35 -0
- semantio/llm/__init__.py +17 -0
- semantio/llm/anthropic.py +39 -0
- semantio/llm/base_llm.py +12 -0
- semantio/llm/groq.py +39 -0
- semantio/llm/llama.py +0 -0
- semantio/llm/openai.py +26 -0
- semantio/memory.py +11 -0
- semantio/rag.py +18 -0
- semantio/storage/__init__.py +0 -0
- semantio/storage/cloud_storage.py +0 -0
- semantio/storage/local_storage.py +0 -0
- semantio/tools/__init__.py +0 -0
- semantio/tools/base_tool.py +12 -0
- semantio/tools/crypto.py +133 -0
- semantio/tools/duckduckgo.py +128 -0
- semantio/tools/stocks.py +131 -0
- semantio/tools/web_browser.py +153 -0
- semantio/utils/__init__.py +7 -0
- semantio/utils/config.py +41 -0
- semantio/utils/date_utils.py +44 -0
- semantio/utils/file_utils.py +56 -0
- semantio/utils/logger.py +20 -0
- semantio/utils/validation_utils.py +44 -0
- semantio-0.0.1.dist-info/LICENSE +21 -0
- semantio-0.0.1.dist-info/METADATA +163 -0
- semantio-0.0.1.dist-info/RECORD +40 -0
- semantio-0.0.1.dist-info/WHEEL +5 -0
- semantio-0.0.1.dist-info/entry_points.txt +3 -0
- semantio-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,163 @@
|
|
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
|
+
Requires-Dist: openai
|
20
|
+
Requires-Dist: anthropic
|
21
|
+
Requires-Dist: groq
|
22
|
+
Requires-Dist: langchain
|
23
|
+
Requires-Dist: faiss-cpu
|
24
|
+
Requires-Dist: pydantic
|
25
|
+
Requires-Dist: requests
|
26
|
+
Requires-Dist: playwright
|
27
|
+
Requires-Dist: fastapi
|
28
|
+
Requires-Dist: uvicorn
|
29
|
+
Requires-Dist: pillow
|
30
|
+
Requires-Dist: slowapi
|
31
|
+
Requires-Dist: sentence-transformers
|
32
|
+
Requires-Dist: fuzzywuzzy
|
33
|
+
Requires-Dist: duckduckgo-search
|
34
|
+
Requires-Dist: yfinance
|
35
|
+
Requires-Dist: forex-python
|
36
|
+
Requires-Dist: qrcode
|
37
|
+
|
38
|
+
# Semantio: The Mother of Your AI Agents
|
39
|
+
|
40
|
+
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.
|
41
|
+
|
42
|
+
We currently support **Groq**, **OpenAI**, and **Anthropic** LLMs, along with a Retrieval-Augmented Generation (RAG) system for enhanced context-awareness.
|
43
|
+
|
44
|
+
## Installation
|
45
|
+
Install Semantio via pip:
|
46
|
+
```bash
|
47
|
+
pip install semantio
|
48
|
+
```
|
49
|
+
|
50
|
+
## Features
|
51
|
+
- **Seamless LLM Integration**: Plug-and-play support for Groq, OpenAI, and Anthropic.
|
52
|
+
- **RAG Support**: Retrieval-Augmented Generation for contextually aware responses.
|
53
|
+
- **Customizable Agents**: Define the personality, behavior, and instructions for your AI agents.
|
54
|
+
- **Extensibility**: Add new tools or modify behavior with ease.
|
55
|
+
|
56
|
+
## Example: Blockchain Research Agent
|
57
|
+
This example demonstrates how to create a blockchain research agent using Semantio and the Groq LLM.
|
58
|
+
|
59
|
+
### Prerequisites
|
60
|
+
1. Set up your Groq API key as an environment variable or directly in the code.
|
61
|
+
|
62
|
+
```python
|
63
|
+
import os
|
64
|
+
os.environ["GROQ_API_KEY"] = "your-api-key" # Replace with your Groq API key
|
65
|
+
```
|
66
|
+
|
67
|
+
2. Import the Semantio Agent class and configure your agent.
|
68
|
+
|
69
|
+
### Code Example
|
70
|
+
```python
|
71
|
+
# Set the Groq API key (either via environment variable or explicitly)
|
72
|
+
import os
|
73
|
+
os.environ["GROQ_API_KEY"] = "your-api-key" # Set the API key here
|
74
|
+
|
75
|
+
# Initialize the Agent
|
76
|
+
from semantio.agent import Agent
|
77
|
+
|
78
|
+
healthcare_research_assistant = Agent(
|
79
|
+
name="Healthcare Agent",
|
80
|
+
description="Extract and structure medical information from the provided text into a JSON format used in healthcare",
|
81
|
+
instructions=[
|
82
|
+
"Always use medical terminology while creating json",
|
83
|
+
"Extract and structure medical information from the provided text into a JSON format used in healthcare",
|
84
|
+
],
|
85
|
+
model="Groq",
|
86
|
+
show_tool_calls=True,
|
87
|
+
user_name="Researcher",
|
88
|
+
emoji=":chains:",
|
89
|
+
markdown=True,
|
90
|
+
)
|
91
|
+
patient_text = """
|
92
|
+
Patient Complaints of High grade fever, chest pain, radiating towards right shoulder. Sweating,
|
93
|
+
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.
|
94
|
+
Advice investigation: CBC, LFT, Chest X ray, Abdomen Ultrasound
|
95
|
+
Medication: Diclofenac 325mg twice a day for 5 days, Amoxiclave 625mg once a day for 5 days, Azithromycin 500mg Once a day
|
96
|
+
Ibuprofen SOS, Paracetamol sos, Pentoprazol before breakfast , follow up after 2 days
|
97
|
+
"""
|
98
|
+
# Test the Agent
|
99
|
+
healthcare_research_assistant.print_response(patient_text)
|
100
|
+
```
|
101
|
+
|
102
|
+
## File Structure
|
103
|
+
The Semantio SDK is organized as follows:
|
104
|
+
```
|
105
|
+
Semantio/
|
106
|
+
├── semantio/ # Core package
|
107
|
+
│ ├── __init__.py # Package initialization
|
108
|
+
│ ├── agent.py # Core Agent class
|
109
|
+
│ ├── rag.py # RAG functionality
|
110
|
+
│ ├── memory.py # Conversation memory management
|
111
|
+
│ ├── llm/ # LLM integrations
|
112
|
+
│ │ ├── __init__.py
|
113
|
+
│ │ ├── openai.py # OpenAI integration
|
114
|
+
│ │ ├── anthropic.py # Anthropic (Claude) integration
|
115
|
+
│ │ ├── llama.py # Llama 2 integration
|
116
|
+
│ │ └── base_llm.py # Base class for LLMs
|
117
|
+
│ ├── knowledge_base/ # Knowledge base integration
|
118
|
+
│ │ ├── __init__.py
|
119
|
+
│ │ ├── vector_store.py # Vector store for embeddings
|
120
|
+
│ │ ├── document_loader.py # Load documents into the knowledge base
|
121
|
+
│ │ └── retriever.py # Retrieve relevant documents
|
122
|
+
│ ├── tools/ # Tools for assistants
|
123
|
+
│ │ ├── __init__.py
|
124
|
+
│ │ ├── calculator.py # Example tool: Calculator
|
125
|
+
│ │ ├── web_search.py # Example tool: Web search
|
126
|
+
│ │ └── base_tool.py # Base class for tools
|
127
|
+
│ ├── storage/ # Storage for memory and data
|
128
|
+
│ │ ├── __init__.py
|
129
|
+
│ │ ├── local_storage.py # Local file storage
|
130
|
+
│ │ └── cloud_storage.py # Cloud storage (e.g., S3, GCP)
|
131
|
+
│ ├── utils/ # Utility functions
|
132
|
+
│ │ ├── __init__.py
|
133
|
+
│ │ ├── logger.py # Logging utility
|
134
|
+
│ │ └── config.py # Configuration loader
|
135
|
+
│ └── cli/ # Command-line interface
|
136
|
+
│ ├── __init__.py
|
137
|
+
│ └── main.py # CLI entry point
|
138
|
+
├── tests/ # Unit tests
|
139
|
+
│ ├── __init__.py
|
140
|
+
│ ├── test_assistant.py
|
141
|
+
│ ├── test_rag.py
|
142
|
+
│ └── test_memory.py
|
143
|
+
├── examples/ # Example usage
|
144
|
+
│ ├── basic_assistant.py
|
145
|
+
│ ├── customer_support.py
|
146
|
+
│ └── research_assistant.py
|
147
|
+
├── requirements.txt # Dependencies
|
148
|
+
├── setup.py # Installation script
|
149
|
+
├── README.md # Documentation
|
150
|
+
└── LICENSE # License file
|
151
|
+
```
|
152
|
+
|
153
|
+
## Contributing
|
154
|
+
Contributions are welcome! Please fork the repository, create a feature branch, and submit a pull request with a detailed description of your changes.
|
155
|
+
|
156
|
+
## License
|
157
|
+
This project is licensed under the [MIT License](LICENSE).
|
158
|
+
|
159
|
+
## Support
|
160
|
+
For issues, feature requests, or questions, please open an issue in the repository or reach out to the team.
|
161
|
+
|
162
|
+
|
163
|
+
|
@@ -0,0 +1,40 @@
|
|
1
|
+
semantio/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
2
|
+
semantio/agent.py,sha256=iS9Yf18iG43SYTxSjmYCZl69OinRKqiVvnBtvLnEF8o,27001
|
3
|
+
semantio/memory.py,sha256=eNAwyAokppHzMcIyFgOw2hT2wnLQBd9GL4T5eallNV4,281
|
4
|
+
semantio/rag.py,sha256=ROy3Pa1NURcDs6qQZ8IMoa5Xlzt6I-msEq0C1p8UgB0,472
|
5
|
+
semantio/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
semantio/api/api_generator.py,sha256=Q-USITEpluRESEaQuOmF7m1vhLKYU9P8eGlQppKT9J4,829
|
7
|
+
semantio/api/fastapi_app.py,sha256=DyTgKJKikMe2G6wWmyzo1rBLXQFi8UWWUMY3UGH4f24,2128
|
8
|
+
semantio/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
9
|
+
semantio/cli/main.py,sha256=BvY2B2xUSV1Q-4K6eH5P1tJB2Y0aL_rm-1ZW-D0F3eU,1115
|
10
|
+
semantio/knowledge_base/__init__.py,sha256=mvp0GFiGSjcxlkaDulAwKOCL9s6gsKTqhPKXF9N3n1g,172
|
11
|
+
semantio/knowledge_base/document_loader.py,sha256=nix0yZJ-JJoDbhLkpg5bKDMvNrwykmknI7MRIn0N81k,1910
|
12
|
+
semantio/knowledge_base/retriever.py,sha256=XpdzKS1UCncJImVMtG67VXMC7lp2eRzKnShjvktsFMM,1271
|
13
|
+
semantio/knowledge_base/vector_store.py,sha256=4Zv9kfqDD3cfn_4R8ZoLKdAQCZRYo_IENP_KkLB_RPc,987
|
14
|
+
semantio/llm/__init__.py,sha256=aZ1vA6qdnz0481Xhi-5GpnxmqyO-5pLYQgww6xYaT-4,572
|
15
|
+
semantio/llm/anthropic.py,sha256=nGq52klAz_N3foJJRNgUwW9LNpBHmZx-y-EEwR4yh78,1268
|
16
|
+
semantio/llm/base_llm.py,sha256=YezjFrgAz-2jT7t70EnE3x-OHoWFxauBlhrQxP4RJk0,287
|
17
|
+
semantio/llm/groq.py,sha256=ZfYoZ5c7oW9GoryJBeKhthqB91zC-LilOVnMoiu9Opg,1244
|
18
|
+
semantio/llm/llama.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
+
semantio/llm/openai.py,sha256=F0sFYsJv6XdDQFNoG2dkGH8QuD5iE5hQ3-ulGYnLnJc,1016
|
20
|
+
semantio/storage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
21
|
+
semantio/storage/cloud_storage.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
22
|
+
semantio/storage/local_storage.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
+
semantio/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
24
|
+
semantio/tools/base_tool.py,sha256=xBNSa_8a8WmA4BGRLG2dE7wj9GnBcZo7-P2SyD86GvY,571
|
25
|
+
semantio/tools/crypto.py,sha256=mut1ztvpPcUUP3b563dh_FmKtP68KmNis3Qm8WENj8w,5559
|
26
|
+
semantio/tools/duckduckgo.py,sha256=6mGn0js0cIsVxQlAgB8AYNLP05H8WmJKnSVosiO9iH0,5034
|
27
|
+
semantio/tools/stocks.py,sha256=BVuK61O9OmWQjj0YdiCJY6TzpiFJ_An1UJB2RkDfX2k,5393
|
28
|
+
semantio/tools/web_browser.py,sha256=LMwPFTHNTtqCp8MEHVlJJUSJa91vM7MZWIL5RDQKF4U,4980
|
29
|
+
semantio/utils/__init__.py,sha256=Lx4X4iJpRhZzRmpQb80XXh5Ve8ZMOkadWAxXSmHpO_8,244
|
30
|
+
semantio/utils/config.py,sha256=ZTwUTqxjW3-w94zoU7GzivWyJe0JJGvBfuB4RUOuEs8,1198
|
31
|
+
semantio/utils/date_utils.py,sha256=x3oqRGv6ee_KCJ0LvCqqZh_FSgS6YGOHBwZQS4TJetY,1471
|
32
|
+
semantio/utils/file_utils.py,sha256=b_cMuJINEGk9ikNuNHSn9lsmICWwvtnCDZ03ndH_S2I,1779
|
33
|
+
semantio/utils/logger.py,sha256=TmGbP8BRjLMWjXi2GWzZ0RIXt70x9qX3FuIqghCNlwM,510
|
34
|
+
semantio/utils/validation_utils.py,sha256=iwoxEb4Q5ILqV6tbesMjPWPCCoL3AmPLejGUy6q8YvQ,1284
|
35
|
+
semantio-0.0.1.dist-info/LICENSE,sha256=teQbWD2Zlcl1_Fo29o2tNbs6G26hbCQiUzds5fQGYlY,1063
|
36
|
+
semantio-0.0.1.dist-info/METADATA,sha256=XvS9jISWNZ6PeqdbuTRH9heUdfopa2ILmlrnQOSnBZk,6715
|
37
|
+
semantio-0.0.1.dist-info/WHEEL,sha256=ewwEueio1C2XeHTvT17n8dZUJgOvyCWCt0WVNLClP9o,92
|
38
|
+
semantio-0.0.1.dist-info/entry_points.txt,sha256=zbPgevSLwcLpdRHqI_atE8EOt8lK2vRF1AoDflDTo18,53
|
39
|
+
semantio-0.0.1.dist-info/top_level.txt,sha256=Yte_6mb-bh-I_lQwMjk1GijZkxPoX4Zmp3kBftC1ZlA,9
|
40
|
+
semantio-0.0.1.dist-info/RECORD,,
|
@@ -0,0 +1 @@
|
|
1
|
+
semantio
|