Partially revert 7b6c640f91
This commit is contained in:
@@ -99,24 +99,8 @@ class RequestAdapter:
|
|||||||
)
|
)
|
||||||
return out
|
return out
|
||||||
|
|
||||||
for idx, tool in enumerate(tools):
|
for tool in tools:
|
||||||
if not isinstance(tool, dict):
|
|
||||||
current_app.logger.warning(
|
|
||||||
"Skipping tool at index %s because it is not a dict (got %s).",
|
|
||||||
idx,
|
|
||||||
type(tool).__name__,
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
|
|
||||||
function = tool.get("function")
|
function = tool.get("function")
|
||||||
if not isinstance(function, dict):
|
|
||||||
current_app.logger.warning(
|
|
||||||
"Skipping tool at index %s because function payload is missing or invalid: %r",
|
|
||||||
idx,
|
|
||||||
function,
|
|
||||||
)
|
|
||||||
continue
|
|
||||||
|
|
||||||
transformed: Dict[str, Any] = {
|
transformed: Dict[str, Any] = {
|
||||||
"type": "function",
|
"type": "function",
|
||||||
"name": function.get("name"),
|
"name": function.get("name"),
|
||||||
|
|||||||
+12
-1
@@ -6,6 +6,17 @@ x-default-volumes: &default_volumes
|
|||||||
- ./:/app
|
- ./:/app
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
flask-dev:
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
target: development
|
||||||
|
args:
|
||||||
|
<<: *build_args
|
||||||
|
image: "app-development"
|
||||||
|
ports:
|
||||||
|
- "8080:5000"
|
||||||
|
<<: *default_volumes
|
||||||
|
|
||||||
flask-prod:
|
flask-prod:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
@@ -14,7 +25,7 @@ services:
|
|||||||
<<: *build_args
|
<<: *build_args
|
||||||
image: "app-production"
|
image: "app-production"
|
||||||
ports:
|
ports:
|
||||||
- "9090:5000"
|
- "8080:5000"
|
||||||
environment:
|
environment:
|
||||||
FLASK_ENV: production
|
FLASK_ENV: production
|
||||||
FLASK_DEBUG: 0
|
FLASK_DEBUG: 0
|
||||||
|
|||||||
Reference in New Issue
Block a user