updated env

This commit is contained in:
OwusuBlessing
2025-09-11 23:16:57 +01:00
parent 20f96c0f30
commit e2eb9f90ed
3 changed files with 202 additions and 33 deletions
+116 -33
View File
@@ -1,44 +1,127 @@
# Ignore virtual environment # Byte-compiled / optimized / DLL files
venv/
groq_keys.json
cerebras_keys.json
# Ignore Python cache files
__pycache__/ __pycache__/
*.py[cod]
*$py.class
# Ignore Jupyter Notebook checkpoints # C extensions
.ipynb_checkpoints/ *.so
# Ignore log files # Distribution / packaging
*.log .Python
test.py build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# Ignore data directory # PyInstaller
data/ *.manifest
*.spec
# Ignore all .docx and .pdf files # Installer logs
*.docx pip-log.txt
*.pdf pip-delete-this-directory.txt
test_keys.py
# Ignore all files in specs/ directory # Unit test / coverage reports
specs/* htmlcov/
chronobid/* .tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
*.hypothesis/
.pytest_cache/
cover/
# Except for scp_engr_doc.json in specs/ directory # Jupyter Notebook
!specs/scp_engr_doc.json .ipynb_checkpoints
!specs/Aienergy.discipline.json
!specs/Aienergy.discipline.criteria.json
db.sqlite3 # IPython
services/lab.html profile_default/
env.json ipython_config.py
api.json # pyenv
.python-version
# pipenv
Pipfile.lock
# poetry
poetry.lock
# uv
.uv/
uv.lock
# PDM
.pdm.toml
__pypackages__/
# pyflow
.pyflow/
# Celery
celerybeat-schedule
celerybeat.pid
# SageMath
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder
.spyderproject
.spyproject
# Rope
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
.idea/
# VS Code / Cursor
.vscode/
.history/
# MacOS
.DS_Store .DS_Store
_venv
testing_grounds.py
claude_messages.json
.env.production
docs/flask_apispec
+24
View File
@@ -0,0 +1,24 @@
[
{
"question": "What is our company's vacation policy?",
"answer": "Full-time employees are entitled to 20 paid vacation days per year. Vacation days can be taken after completing 6 months of employment. Unused vacation days can be carried over to the next year up to a maximum of 5 days. Vacation requests should be submitted at least 2 weeks in advance through the HR portal."
},
{
"question": "How do I request a new software license?",
"answer": "To request a new software license, please submit a ticket through the IT Service Desk portal. Include the software name, version, and business justification. Standard software licenses are typically approved within 2 business days. For specialized software, approval may take up to 5 business days and may require department head approval."
},
{
"question": "What is our remote work policy?",
"answer": "Our company follows a hybrid work model. Employees can work remotely up to 3 days per week. Remote work days must be coordinated with your team and approved by your direct manager. All remote work requires a stable internet connection and a dedicated workspace. Core collaboration hours are 10:00 AM to 3:00 PM EST."
},
{
"question": "How do I submit an expense report?",
"answer": "Expense reports should be submitted through the company's expense management system. Include all receipts, categorize expenses appropriately, and add a brief description for each entry. Reports must be submitted within 30 days of the expense. For expenses over $100, additional documentation may be required. All reports require manager approval."
},
{
"question": "What is our process for reporting a security incident?",
"answer": "If you discover a security incident, immediately contact the Security Team at security@company.com or call the 24/7 security hotline. Do not attempt to investigate or resolve the incident yourself. Document what you observed, including timestamps and affected systems. The Security Team will guide you through the incident response process and may need your assistance for investigation."
}
]
+62
View File
@@ -0,0 +1,62 @@
import asyncio
import nest_asyncio
from mcp import ClientSession
from mcp.client.sse import sse_client
nest_asyncio.apply() # Needed to run interactive python
"""
Make sure:
1. The server is running before running this script.
2. The server is configured to use SSE transport.
3. The server is listening on port 8050.
To run the server:
uv run server.py
"""
async def main():
# Connect to the server using SSE
async with sse_client("http://localhost:8050/sse") as (read_stream, write_stream):
async with ClientSession(read_stream, write_stream) as session:
# Initialize the connection
await session.initialize()
# List available tools
tools_result = await session.list_tools()
print("Available tools:")
for tool in tools_result.tools:
print(f" - {tool.name}: {tool.description}")
# List available prompts
prompts_result = await session.list_prompts()
print(f"\nAvailable prompts ({len(prompts_result.prompts)}):")
for prompt in prompts_result.prompts:
print(f" - {prompt.name}: {prompt.description}")
# List available resources
resources_result = await session.list_resources()
print(f"\nAvailable resources ({len(resources_result.resources)}):")
for resource in resources_result.resources:
print(f" - {resource.uri}: {resource.name}")
if resource.description:
print(f" Description: {resource.description}")
if hasattr(resource, 'mime_type') and resource.mime_type:
print(f" MIME Type: {resource.mime_type}")
# Test a simple tool call (if any tools are available)
if tools_result.tools:
print(f"\nTesting tool execution with '{tools_result.tools[0].name}':")
try:
# Try to call the first available tool with empty arguments to see what happens
result = await session.call_tool(tools_result.tools[0].name, arguments={})
print(f"Tool result: {result.content[0].text if result.content else 'No content'}")
except Exception as e:
print(f"Tool execution failed: {e}")
else:
print("\nNo tools available to test.")
if __name__ == "__main__":
asyncio.run(main())