Spaces:
Runtime error
Runtime error
leandrocarneiro
commited on
Update llm.py
Browse files
llm.py
CHANGED
@@ -6,15 +6,15 @@ import os
|
|
6 |
|
7 |
def invoke_llm(context, task):
|
8 |
prompt = f"""You are an assistant of a newspaper.
|
9 |
-
|
10 |
-
The task is delimited by
|
11 |
Write in a formal language and in portuguese language.
|
12 |
Execute the task just based on the given context.
|
13 |
-
Your task is:
|
14 |
-
The context is:
|
15 |
"""
|
16 |
|
17 |
-
llm=ChatOpenAI(model_name="gpt-3.5-turbo
|
18 |
temperature=0.1,
|
19 |
openai_api_key=os.environ['OPENAI_KEY'],
|
20 |
max_tokens=1000)
|
|
|
6 |
|
7 |
def invoke_llm(context, task):
|
8 |
prompt = f"""You are an assistant of a newspaper.
|
9 |
+
Execute the task just based on the given context.
|
10 |
+
The task is delimited by <> and the context is delimited by <>
|
11 |
Write in a formal language and in portuguese language.
|
12 |
Execute the task just based on the given context.
|
13 |
+
Your task is: <{task}>
|
14 |
+
The context is: <{context>
|
15 |
"""
|
16 |
|
17 |
+
llm=ChatOpenAI(model_name="gpt-3.5-turbo",
|
18 |
temperature=0.1,
|
19 |
openai_api_key=os.environ['OPENAI_KEY'],
|
20 |
max_tokens=1000)
|