Spaces:
Running
Running
luanpoppe
commited on
Commit
·
834da99
1
Parent(s):
bf45279
feat: adicionando pequena instrução ao system_prompt padrão
Browse files
langchain_backend/utils.py
CHANGED
@@ -75,7 +75,7 @@ def create_llm(modelParam):
|
|
75 |
return HuggingFaceEndpoint(
|
76 |
repo_id=modelParam,
|
77 |
task="text-generation",
|
78 |
-
|
79 |
do_sample=False,
|
80 |
huggingfacehub_api_token=os.environ.get("HUGGINGFACEHUB_API_TOKEN")
|
81 |
)
|
@@ -151,10 +151,8 @@ Example: :
|
|
151 |
"[Título da obra]" [i]Resumo:[/i] [Resumo da posição do autor]",
|
152 |
|
153 |
"palavras_chave": "[size=4][b]4. Palavras-chave Principais[/b][/size]
|
154 |
-
[Palavra
|
155 |
-
|
156 |
-
[Palavra
|
157 |
-
have 2]
|
158 |
[Palavra-chave 3]
|
159 |
[Adicione outras palavras relevantes]"
|
160 |
}}
|
@@ -168,4 +166,7 @@ Remember:
|
|
168 |
- If the summary request asks for a specific focus or perspective, make sure to address it directly.
|
169 |
|
170 |
Your goal is to provide a comprehensive yet concise summary that accurately represents the document's content while meeting the specific needs outlined in the summary request.
|
|
|
|
|
|
|
171 |
"""
|
|
|
75 |
return HuggingFaceEndpoint(
|
76 |
repo_id=modelParam,
|
77 |
task="text-generation",
|
78 |
+
max_new_tokens=1100,
|
79 |
do_sample=False,
|
80 |
huggingfacehub_api_token=os.environ.get("HUGGINGFACEHUB_API_TOKEN")
|
81 |
)
|
|
|
151 |
"[Título da obra]" [i]Resumo:[/i] [Resumo da posição do autor]",
|
152 |
|
153 |
"palavras_chave": "[size=4][b]4. Palavras-chave Principais[/b][/size]
|
154 |
+
[Palavra-chave 1]
|
155 |
+
[Palavra-chave 2]
|
|
|
|
|
156 |
[Palavra-chave 3]
|
157 |
[Adicione outras palavras relevantes]"
|
158 |
}}
|
|
|
166 |
- If the summary request asks for a specific focus or perspective, make sure to address it directly.
|
167 |
|
168 |
Your goal is to provide a comprehensive yet concise summary that accurately represents the document's content while meeting the specific needs outlined in the summary request.
|
169 |
+
|
170 |
+
Do not pass in the response part of the instructions that you received
|
171 |
+
The content to be summarized is as follows:
|
172 |
"""
|