ApiLogicServer 14.3.25__py3-none-any.whl → 14.4.0__py3-none-any.whl
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.
- api_logic_server_cli/api_logic_server.py +4 -14
- api_logic_server_cli/api_logic_server_info.yaml +3 -3
- api_logic_server_cli/cli.py +16 -7
- api_logic_server_cli/create_from_model/__pycache__/create_db_from_model.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/ont_build.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/__pycache__/ont_create.cpython-312.pyc +0 -0
- api_logic_server_cli/create_from_model/create_db_from_model.py +2 -0
- api_logic_server_cli/create_from_model/ont_build.py +19 -14
- api_logic_server_cli/create_from_model/ont_create.py +5 -5
- api_logic_server_cli/create_from_model/safrs-react-admin-npm-build/static/.DS_Store +0 -0
- api_logic_server_cli/database/nw-gold-fix.sql +62 -0
- api_logic_server_cli/database/nw-gold.sqlite +0 -0
- api_logic_server_cli/{prototypes/manager/webgenai → fragments}/docker-compose.yml +1 -1
- api_logic_server_cli/genai/genai.py +42 -11
- api_logic_server_cli/genai/genai_graphics.py +252 -38
- api_logic_server_cli/genai/genai_svcs.py +20 -12
- api_logic_server_cli/manager.py +19 -10
- api_logic_server_cli/prototypes/.DS_Store +0 -0
- api_logic_server_cli/prototypes/base/.DS_Store +0 -0
- api_logic_server_cli/prototypes/base/.vscode/launch.json +19 -0
- api_logic_server_cli/prototypes/base/api/expose_api_models.py +3 -1
- api_logic_server_cli/prototypes/base/api_logic_server_run.py +5 -2
- api_logic_server_cli/prototypes/base/config/activate_logicbank.py +1 -0
- api_logic_server_cli/prototypes/base/config/config.py +57 -14
- api_logic_server_cli/prototypes/base/config/logging.yml +1 -0
- api_logic_server_cli/prototypes/base/config/server_setup.py +33 -1
- api_logic_server_cli/prototypes/base/database/test_data/readme.md +3 -1
- api_logic_server_cli/prototypes/base/devops/docker-standard-image/docker-compose-standard-image.yml +7 -2
- api_logic_server_cli/prototypes/base/docs/training/logic_bank_api.prompt +314 -0
- api_logic_server_cli/prototypes/base/docs/training/logic_example.py +41 -0
- api_logic_server_cli/prototypes/base/integration/kafka/kafka_producer.py +7 -3
- api_logic_server_cli/prototypes/base/integration/system/FlaskKafka.py +5 -1
- api_logic_server_cli/prototypes/base/ui/templates/bar_chart.jinja +64 -0
- api_logic_server_cli/prototypes/genai_demo/ui/admin/admin.yaml +1 -1
- api_logic_server_cli/prototypes/manager/README.md +26 -4
- api_logic_server_cli/prototypes/manager/system/genai/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/.DS_Store +0 -0
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.prompt +0 -10
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo.response_example +32 -10
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/002_create_db_models.prompt +4 -4
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_docs_logic/docs/003_create_db_models.response +77 -47
- api_logic_server_cli/prototypes/manager/system/genai/examples/genai_demo/genai_demo_informal.prompt +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/dashboard_services.jinja +83 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_dashboard_WIP.py +34 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/{graphics_services.py → graphics_services_api_xxx.py} +0 -9
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db.jinja +46 -0
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/graphics_services_db_each_method.jinja +36 -0
- api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/graphics.prompt +7 -3
- api_logic_server_cli/prototypes/manager/system/genai/prompt_inserts/response_format.prompt +8 -1
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.ps1 +100 -0
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/install-ApiLogicServer-dev.sh +116 -0
- api_logic_server_cli/prototypes/manager/system/install-ApiLogicServer-dev/readme.md +7 -0
- api_logic_server_cli/prototypes/manager/system/style-guide.yaml +2 -2
- api_logic_server_cli/prototypes/manager/webgenai/README.md +6 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/count_orders_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/order_count_by_month.prompt +1 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/request copy.json +892 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/request.json +6 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/response.json +17 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/response.yaml +59 -0
- api_logic_server_cli/prototypes/nw/docs/graphics/sales_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw/ui/admin/home.js +5 -4
- api_logic_server_cli/prototypes/nw/ui/app_model_custom.yaml +851 -1082
- api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/count_orders_by_category.prompt +1 -0
- api_logic_server_cli/prototypes/nw_no_cust/docs/graphics/sales_by_employee.prompt +1 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/1_langchain_loader.py +19 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/2_gpt_mcp_prompt.txt +19 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/3_executor_test_agent.py +38 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/README.md +17 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/curl.txt +4 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/resources/nw_swagger_3.yaml +16660 -0
- api_logic_server_cli/prototypes/nw_no_cust/integration/mcp/run_executor.py +23 -0
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/nginx/nginx.conf +2 -2
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/package.json +6 -6
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/app/app.config.ts +2 -1
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.prod.ts +5 -5
- api_logic_server_cli/prototypes/ont_app/ontimize_seed/src/environments/environment.ts +5 -5
- api_logic_server_cli/prototypes/ont_app/templates/app_config.jinja +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/detail_template.html +1 -1
- api_logic_server_cli/prototypes/ont_app/templates/new_template.html +16 -16
- apilogicserver-14.4.0.dist-info/METADATA +76 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/RECORD +87 -56
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/WHEEL +1 -1
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_jsonapi_rpc.jinja +0 -37
- api_logic_server_cli/prototypes/manager/system/genai/graphics_templates/service_template_unused.jinja +0 -38
- apilogicserver-14.3.25.dist-info/METADATA +0 -167
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/entry_points.txt +0 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/licenses/LICENSE +0 -0
- {apilogicserver-14.3.25.dist-info → apilogicserver-14.4.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Graph number of sales per category, for dashboard
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Graph Sales by Employee, for Dashboard
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
from langchain.tools.openapi.utils.openapi_utils import OpenAPISpec
|
|
2
|
+
from langchain.tools.openapi.tool import OpenAPITool
|
|
3
|
+
|
|
4
|
+
# Load your OpenAPI spec
|
|
5
|
+
spec = OpenAPISpec.from_file("nw_swagger_3.yaml")
|
|
6
|
+
|
|
7
|
+
# Create LangChain tool from a specific endpoint
|
|
8
|
+
customer_tool = OpenAPITool.from_openapi_spec(
|
|
9
|
+
spec=spec,
|
|
10
|
+
operation_id="getCustomer", # use actual operationId from your spec
|
|
11
|
+
verbose=True
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
# Run a test call
|
|
15
|
+
result = customer_tool.run({
|
|
16
|
+
"filter[Country]": "USA",
|
|
17
|
+
"page[limit]": 3
|
|
18
|
+
})
|
|
19
|
+
print(result)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
You are an AI planner that builds tool_context blocks for a JSON:API server using OpenAPI 3.0.
|
|
2
|
+
|
|
3
|
+
Use this OpenAPI file: [insert contents of nw_swagger_3.yaml]
|
|
4
|
+
|
|
5
|
+
Given the goal: "List all customers from Germany, limited to 2 results", generate a JSON MCP tool_context like this:
|
|
6
|
+
|
|
7
|
+
{
|
|
8
|
+
"tool": "json-api",
|
|
9
|
+
"method": "GET",
|
|
10
|
+
"url": "https://your-api-domain.com/Customer",
|
|
11
|
+
"query_params": {
|
|
12
|
+
"filter[Country]": "Germany",
|
|
13
|
+
"page[limit]": 2
|
|
14
|
+
},
|
|
15
|
+
"headers": {
|
|
16
|
+
"Accept": "application/vnd.api+json"
|
|
17
|
+
},
|
|
18
|
+
"expected_output": "List of customer records"
|
|
19
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
|
|
3
|
+
# MCP-style tool_context
|
|
4
|
+
'''
|
|
5
|
+
tool_context = {
|
|
6
|
+
"method": "GET",
|
|
7
|
+
"url": "http://localhost:5656/api/Customer",
|
|
8
|
+
"query_params": {
|
|
9
|
+
"filter[Country]": "Germany",
|
|
10
|
+
"page[limit]": 2
|
|
11
|
+
},
|
|
12
|
+
"headers": {
|
|
13
|
+
"Accept": "application/vnd.api+json"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
'''
|
|
17
|
+
tool_context = {
|
|
18
|
+
"method": "GET",
|
|
19
|
+
"url": "http://localhost:5656/api/Customer",
|
|
20
|
+
"query_params": {
|
|
21
|
+
"filter[Country]": "Germany"
|
|
22
|
+
},
|
|
23
|
+
"headers": {
|
|
24
|
+
"Accept": "application/vnd.api+json"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# Execute as a simulated MCP executor
|
|
30
|
+
response = requests.get(
|
|
31
|
+
tool_context["url"],
|
|
32
|
+
headers=tool_context["headers"],
|
|
33
|
+
params=tool_context["query_params"]
|
|
34
|
+
)
|
|
35
|
+
|
|
36
|
+
# Display result
|
|
37
|
+
print(response.status_code)
|
|
38
|
+
print(response.json())
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Model Context Protocol is a way for Chat agents to discover and call external servers, be they databases, APIs, file systems, etc, and call their services. And, for multiple such servers to be choreographed in a chain of calls.
|
|
2
|
+
|
|
3
|
+
For more information:
|
|
4
|
+
|
|
5
|
+
* [see here](https://modelcontextprotocol.io/introduction){:target="_blank" rel="noopener"}
|
|
6
|
+
* [and here](https://apilogicserver.github.io/Docs/Integration-MCP/){:target="_blank" rel="noopener"}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
> Status: Technology Exploration
|
|
10
|
+
|
|
11
|
+
## ChatGPT testing
|
|
12
|
+
|
|
13
|
+
In the Manager, open `samples/nw_sample_nocust`, and explore `integration/mcp`. This has been successfully used to invoke the server.
|
|
14
|
+
|
|
15
|
+
This is just an initial experiment, without automation such as creation of openAI version 3 from version 2. Many substantive issues need to be addressed, including but not limited to security, update, etc.
|
|
16
|
+
|
|
17
|
+
We welcome participation in this exploration. Please contact us via [discord](https://discord.gg/HcGxbBsgRF){:target="_blank" rel="noopener"}.
|