Update Jarvis implement

This commit is contained in:
Liu Zhicong
2024-01-15 22:52:13 -08:00
parent 5885301c19
commit 0bc2aaf45b
9 changed files with 802 additions and 170 deletions
+2 -2
View File
@@ -160,8 +160,8 @@ class BaseLLMProcess(ABC):
# Action define in prompt, will be execute after llm compute
prompt = await self.prepare_prompt(input)
max_result_token = self.max_token - ComputeKernel.llm_num_tokens(prompt,self.model_name)
if max_result_token < MIN_PREDICT_TOKEN_LEN:
return LLMResult.from_error_str(f"prompt too long,can not predict")
#if max_result_token < MIN_PREDICT_TOKEN_LEN:
# return LLMResult.from_error_str(f"prompt too long,can not predict")
task_result: ComputeTaskResult = await (ComputeKernel.get_instance().do_llm_completion(
prompt,