mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-07-06 21:17:51 +02:00
create/update all Phi-3 templates
This commit is contained in:
@@ -8,8 +8,8 @@ class Constants:
|
||||
ALT_COMPLETION_TEXT = "I can't answer that."
|
||||
|
||||
class PromptTemplateIds:
|
||||
PHI_3_MINI_4K_INSTRUCT__01_BASIC = "phi-3-mini-4k-instruct-basic"
|
||||
PHI_3_MINI_4K_INSTRUCT__02_ZERO_SHOT_CHAIN_OF_THOUGHT = "phi-3-mini-4k-instruct-zero-shot-cot"
|
||||
PHI_3_MINI_4K_INSTRUCT__03_FEW_SHOT_EXAMPLES = "phi-3-mini-4k-instruct-few-shot"
|
||||
PHI_3_MINI_4K_INSTRUCT__04_FEW_SHOT_RAG_PLUS_COT = "phi-3-mini-4k-instruct-few-shot-rag-plus-cot"
|
||||
PHI_3_MINI_4K_INSTRUCT__05_REFLEXION = "phi-3-mini-4k-instruct-reflexion"
|
||||
PHI_3_MINI_4K_INSTRUCT__01_BASIC = "phi-3-mini-4k-instruct.01-basic"
|
||||
PHI_3_MINI_4K_INSTRUCT__02_ZERO_SHOT_CHAIN_OF_THOUGHT = "phi-3-mini-4k-instruct.02-zero-shot-cot"
|
||||
PHI_3_MINI_4K_INSTRUCT__03_FEW_SHOT_EXAMPLES = "phi-3-mini-4k-instruct.03-few-shot"
|
||||
PHI_3_MINI_4K_INSTRUCT__04_FEW_SHOT_RAG_PLUS_COT = "phi-3-mini-4k-instruct.04-few-shot-rag-plus-cot"
|
||||
PHI_3_MINI_4K_INSTRUCT__05_REFLEXION = "phi-3-mini-4k-instruct.05-reflexion"
|
||||
@@ -54,7 +54,7 @@ class BaseSecurityGuidelinesService(AbstractSecurityGuidelinesService):
|
||||
raise ValueError(f"Parameter 'user_prompt' cannot be empty or None")
|
||||
|
||||
try:
|
||||
prompt_template = self._get_template(user_prompt=user_prompt)
|
||||
prompt_template = self._get_template(user_prompt=user_prompt)
|
||||
chain = self._create_chain(prompt_template)
|
||||
result = GuidelinesResult(
|
||||
completion_text=chain.invoke(user_prompt),
|
||||
|
||||
Reference in New Issue
Block a user