Skip to content

Commit cbebd03

Browse files
committed
stg
1 parent bc2d503 commit cbebd03

File tree

16 files changed

+26
-97
lines changed

16 files changed

+26
-97
lines changed

helpers/python.ts

-6
Original file line numberDiff line numberDiff line change
@@ -470,12 +470,6 @@ export const installPythonTemplate = async ({
470470
}
471471
}
472472

473-
// Copy engine code
474-
await copy("**", enginePath, {
475-
parents: true,
476-
cwd: path.join(compPath, "engines", "python", engine),
477-
});
478-
479473
// Copy router code
480474
await copyRouterCode(root, tools ?? []);
481475
}

questions/datasources.ts

+6-4
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,12 @@ export const getDataSourceChoices = (
1919
});
2020
}
2121
if (selectedDataSource === undefined || selectedDataSource.length === 0) {
22-
choices.push({
23-
title: "No datasource",
24-
value: "none",
25-
});
22+
if (framework !== "fastapi") {
23+
choices.push({
24+
title: "No datasource",
25+
value: "none",
26+
});
27+
}
2628
choices.push({
2729
title:
2830
process.platform !== "linux"

templates/components/engines/python/chat/engine.py

-47
This file was deleted.

templates/components/engines/python/chat/node_postprocessors.py

-21
This file was deleted.

templates/types/streaming/fastapi/app/api/routers/chat.py

+20-19
Original file line numberDiff line numberDiff line change
@@ -59,25 +59,26 @@ async def chat(
5959

6060

6161
# TODO: Update non-streaming endpoint
62-
# non-streaming endpoint - delete if not needed
63-
@r.post("/request")
64-
async def chat_request(
65-
data: ChatData,
66-
) -> Result:
67-
last_message_content = data.get_last_message_content()
68-
messages = data.get_history_messages()
62+
# Would be better if we use same chat.py endpoint for both agent and multiagent templates
63+
# # non-streaming endpoint - delete if not needed
64+
# @r.post("/request")
65+
# async def chat_request(
66+
# data: ChatData,
67+
# ) -> Result:
68+
# last_message_content = data.get_last_message_content()
69+
# messages = data.get_history_messages()
6970

70-
doc_ids = data.get_chat_document_ids()
71-
filters = generate_filters(doc_ids)
72-
params = data.data or {}
73-
logger.info(
74-
f"Creating chat engine with filters: {str(filters)}",
75-
)
71+
# doc_ids = data.get_chat_document_ids()
72+
# filters = generate_filters(doc_ids)
73+
# params = data.data or {}
74+
# logger.info(
75+
# f"Creating chat engine with filters: {str(filters)}",
76+
# )
7677

77-
chat_engine = get_chat_engine(filters=filters, params=params)
78+
# chat_engine = get_chat_engine(filters=filters, params=params)
7879

79-
response = await chat_engine.achat(last_message_content, messages)
80-
return Result(
81-
result=Message(role=MessageRole.ASSISTANT, content=response.response),
82-
nodes=SourceNodes.from_source_nodes(response.source_nodes),
83-
)
80+
# response = await chat_engine.achat(last_message_content, messages)
81+
# return Result(
82+
# result=Message(role=MessageRole.ASSISTANT, content=response.response),
83+
# nodes=SourceNodes.from_source_nodes(response.source_nodes),
84+
# )

0 commit comments

Comments
 (0)