WIP - improvements to token usage tracking, simulator added for live testing, improvements to file loading
This commit is contained in:
16
test_simulation_files/config.json
Normal file
16
test_simulation_files/config.json
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"database": {
|
||||||
|
"host": "localhost",
|
||||||
|
"port": 5432,
|
||||||
|
"name": "testdb",
|
||||||
|
"ssl": true
|
||||||
|
},
|
||||||
|
"cache": {
|
||||||
|
"redis_url": "redis://localhost:6379",
|
||||||
|
"ttl": 3600
|
||||||
|
},
|
||||||
|
"logging": {
|
||||||
|
"level": "INFO",
|
||||||
|
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
|
||||||
|
}
|
||||||
|
}
|
||||||
32
test_simulation_files/test_module.py
Normal file
32
test_simulation_files/test_module.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
"""
|
||||||
|
Sample Python module for testing MCP conversation continuity
|
||||||
|
"""
|
||||||
|
|
||||||
|
def fibonacci(n):
|
||||||
|
"""Calculate fibonacci number recursively"""
|
||||||
|
if n <= 1:
|
||||||
|
return n
|
||||||
|
return fibonacci(n-1) + fibonacci(n-2)
|
||||||
|
|
||||||
|
def factorial(n):
|
||||||
|
"""Calculate factorial iteratively"""
|
||||||
|
result = 1
|
||||||
|
for i in range(1, n + 1):
|
||||||
|
result *= i
|
||||||
|
return result
|
||||||
|
|
||||||
|
class Calculator:
|
||||||
|
"""Simple calculator class"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.history = []
|
||||||
|
|
||||||
|
def add(self, a, b):
|
||||||
|
result = a + b
|
||||||
|
self.history.append(f"{a} + {b} = {result}")
|
||||||
|
return result
|
||||||
|
|
||||||
|
def multiply(self, a, b):
|
||||||
|
result = a * b
|
||||||
|
self.history.append(f"{a} * {b} = {result}")
|
||||||
|
return result
|
||||||
Reference in New Issue
Block a user