Skip to content

Commit

Permalink
fix: use system prompt only when using domain llm
Browse files Browse the repository at this point in the history
  • Loading branch information
phanhongan committed Nov 16, 2024
1 parent 541caee commit 34266f4
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions examples/llamarine/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,16 @@ def main(use_domain_lm: bool = False):
f.write(json.dumps(st.session_state.agent_solutions))

solution = st.session_state.agent_solutions[st.session_state.typed_problem]
solution = OpenAILM.from_defaults().get_response(
prompt=f"""Please respond the following text, with making sure there is a conclusion which is the main action item at the end of the response.
{solution}
""",
history=[
{"role": "system", "content": LLAMARINE_SYSTEM_PROMPT},
{"role": "user", "content": LLAMARINE_USER_PROMPT},
]
)
if use_domain_lm:
solution = OpenAILM.from_defaults().get_response(
prompt=f"""Please respond the following text, with making sure there is a conclusion which is the main action item at the end of the response.
{solution}
""",
history=[
{"role": "system", "content": LLAMARINE_SYSTEM_PROMPT},
{"role": "user", "content": LLAMARINE_USER_PROMPT},
]
)

st.markdown(body=solution)

Expand Down

0 comments on commit 34266f4

Please sign in to comment.