Skip to content

Commit

Permalink
feat: add prompt to answer
Browse files Browse the repository at this point in the history
  • Loading branch information
phanhongan committed Nov 14, 2024
1 parent e4e4892 commit 3835b2f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/llamarine/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,15 @@ def main(use_domain_lm: bool = False):
logger.level('DEBUG')

st.session_state.agent_solutions[st.session_state.typed_problem]: str = \
get_or_create_agent(use_domain_lm=use_domain_lm).solve(
get_or_create_agent(use_domain_lm).solve(
problem=st.session_state.typed_problem, allow_reject=True)

if (solution := st.session_state.agent_solutions[st.session_state.typed_problem]):
if use_domain_lm:
solution = OpenAILM.from_defaults().get_response(
prompt=solution,
prompt=f"""Please respond the following text:
{solution}
""",
history=[
{"role": "system", "content": LLAMARINE_SYSTEM_PROMPT},
{"role": "user", "content": LLAMARINE_USER_PROMPT},
Expand Down

0 comments on commit 3835b2f

Please sign in to comment.