File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -455,7 +455,7 @@ def doc2task(
455455 prompt : Optional [str ] = None ,
456456 deterministic : bool = False ,
457457 temperature : float = 0.2 ,
458- max_tokens : int = 1500 ,
458+ max_tokens : int = 10000 ,
459459 file_names : Optional [List [str ]] = None ,
460460 return_raw : bool = False
461461 ) -> Union [str , Dict [str ,str ]]:
@@ -499,9 +499,17 @@ def doc2task(
499499 )
500500
501501 # 4) Build payload
502- payload : Dict [str , Any ] = {"instruction" : instr , "description" : desc }
503502 if self .knowledge_base :
504- payload ["examples" ] = self .knowledge_base
503+ payload = {
504+ "examples" : self .knowledge_base , # few-shot KB
505+ "instruction" : instr , # your request
506+ "context" : desc # this task’s code + config
507+ }
508+ else :
509+ payload = {
510+ "instruction" : instr , # your request
511+ "context" : desc # this task’s code + config
512+ }
505513
506514 full_prompt = json .dumps (payload , indent = 2 , ensure_ascii = False )
507515
You can’t perform that action at this time.
0 commit comments