feat: enhance context handling by adding code context selection and implementing summary generation (#1091) #release
* feat: add context annotation types and enhance file handling in LLM processing * feat: enhance context handling by adding chatId to annotations and implementing summary generation * removed useless changes * feat: updated token counts to include optimization requests * prompt fix * logging added * useless logs removed
This commit is contained in:
@@ -63,7 +63,7 @@ async function llmCallAction({ context, request }: ActionFunctionArgs) {
|
||||
content: `${message}`,
|
||||
},
|
||||
],
|
||||
env: context.cloudflare.env,
|
||||
env: context.cloudflare?.env as any,
|
||||
apiKeys,
|
||||
providerSettings,
|
||||
});
|
||||
@@ -91,7 +91,7 @@ async function llmCallAction({ context, request }: ActionFunctionArgs) {
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
const models = await getModelList({ apiKeys, providerSettings, serverEnv: context.cloudflare.env as any });
|
||||
const models = await getModelList({ apiKeys, providerSettings, serverEnv: context.cloudflare?.env as any });
|
||||
const modelDetails = models.find((m: ModelInfo) => m.name === model);
|
||||
|
||||
if (!modelDetails) {
|
||||
@@ -116,7 +116,7 @@ async function llmCallAction({ context, request }: ActionFunctionArgs) {
|
||||
],
|
||||
model: providerInfo.getModelInstance({
|
||||
model: modelDetails.name,
|
||||
serverEnv: context.cloudflare.env as any,
|
||||
serverEnv: context.cloudflare?.env as any,
|
||||
apiKeys,
|
||||
providerSettings,
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user