mirror of
https://github.com/OneUptime/oneuptime
synced 2024-11-22 07:10:53 +00:00
9ad97b1fe0
This commit adds timeout handling to the Llama prompt execution in the Llama class. It introduces a timeoutInMinutes property in the CopilotActionPrompt interface and uses it to set a timeout for the prompt execution. If the prompt execution exceeds the specified timeout, a LLMTimeoutException is thrown, indicating that the prompt has timed out. This change enhances the reliability and responsiveness of the Llama service by preventing long-running prompts from blocking the execution flow.
9 lines
332 B
TypeScript
9 lines
332 B
TypeScript
import ExceptionCode from "Common/Types/Exception/ExceptionCode";
|
|
import CopilotActionProcessingException from "./CopilotActionProcessingException";
|
|
|
|
export default class LLMTimeoutException extends CopilotActionProcessingException {
|
|
public constructor(message: string) {
|
|
super(ExceptionCode.BadDataException, message);
|
|
}
|
|
}
|