mirror of
https://github.com/lightbroker/llmsecops-research.git
synced 2026-03-19 00:33:59 +00:00
more for templates
This commit is contained in:
@@ -3,6 +3,7 @@ class Constants:
|
||||
PHI_3_END_TOKEN = "<|end|>"
|
||||
PHI_3_SYSTEM_START_TOKEN = "<|system|>"
|
||||
PHI_3_USER_START_TOKEN = "<|user|>"
|
||||
INPUT_VARIABLE_TOKEN = "input"
|
||||
|
||||
class PromptTemplateIds:
|
||||
PHI_3_MINI_4K_INSTRUCT_BASIC = "phi-3-mini-4k-instruct-basic"
|
||||
|
||||
@@ -26,7 +26,7 @@ class ChainOfThoughtSecurityGuidelinesService(
|
||||
|
||||
def _create_chain(self, prompt_template: PromptTemplate):
|
||||
return (
|
||||
{ "question": RunnablePassthrough() }
|
||||
{ f"{self.constants.INPUT_VARIABLE_TOKEN}": RunnablePassthrough() }
|
||||
| prompt_template
|
||||
| self.foundation_model_pipeline
|
||||
| StrOutputParser()
|
||||
|
||||
@@ -26,7 +26,7 @@ class RetrievalAugmentedGenerationContextSecurityGuidelinesService(
|
||||
|
||||
def _create_chain(self, prompt_template: PromptTemplate):
|
||||
return (
|
||||
{ "question": RunnablePassthrough() }
|
||||
{ f"{self.constants.INPUT_VARIABLE_TOKEN}": RunnablePassthrough() }
|
||||
| prompt_template
|
||||
| self.foundation_model_pipeline
|
||||
| StrOutputParser()
|
||||
|
||||
Reference in New Issue
Block a user