Skip to content

Commit

Permalink
summary according to user's question
Browse files Browse the repository at this point in the history
  • Loading branch information
qidanrui committed Jan 4, 2024
1 parent 91db0d2 commit 640938a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
19 changes: 8 additions & 11 deletions dbgpt/agent/agents/expand/summary_assistant_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,17 @@ class SummaryAssistantAgent(ConversableAgent):
"""

DEFAULT_SYSTEM_MESSAGE = (
"""You are a great summary writter to summarize the provided text content."""
"""You are a great summary writter to summarize the provided text content according to user questions.
Please complete this task step by step following instructions below:
1. You need to first detect user's question that you need to answer with your summarization.
2. Output the extracted user's question with the format - The User's Question: user's question.
3. Then you need to summarize the historical messages
4. Output the summarization only related to user's question with the format - The Summarization: the summarization.
"""
)

DEFAULT_DESCRIBE = (
"""Summarize provided text content and output the summaraization."""
"""Summarize provided text content according to use questions and output the summaraization."""
)

NAME = "Summarizer"
Expand Down Expand Up @@ -62,15 +68,6 @@ async def generate_summary_reply(
):
"""Generate a reply with summary."""

# if not message is None:
# exit_success = True
# output = "The generated summary is shown above."
# else:
# exit_success = False
# output = "Nothing is generated, please check your input."

# return True, {"is_exe_success": exit_success, "content": f"{output}"}

response_success = True
view = None
content = None
Expand Down
4 changes: 3 additions & 1 deletion examples/agents/single_summary_agent_dialogue_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
user_proxy.a_initiate_chat(
recipient=summarizer,
reviewer=user_proxy,
message="""Nuclear power in space is the use of nuclear power in outer space, typically either small fission systems or radioactive decay for electricity or heat. Another use is for scientific observation, as in a Mössbauer spectrometer. The most common type is a radioisotope thermoelectric generator, which has been used on many space probes and on crewed lunar missions. Small fission reactors for Earth observation satellites, such as the TOPAZ nuclear reactor, have also been flown.[1] A radioisotope heater unit is powered by radioactive decay and can keep components from becoming too cold to function, potentially over a span of decades.[2]
message="""I want to summarize advantages of Nuclear Power according to the following content.
Nuclear power in space is the use of nuclear power in outer space, typically either small fission systems or radioactive decay for electricity or heat. Another use is for scientific observation, as in a Mössbauer spectrometer. The most common type is a radioisotope thermoelectric generator, which has been used on many space probes and on crewed lunar missions. Small fission reactors for Earth observation satellites, such as the TOPAZ nuclear reactor, have also been flown.[1] A radioisotope heater unit is powered by radioactive decay and can keep components from becoming too cold to function, potentially over a span of decades.[2]
The United States tested the SNAP-10A nuclear reactor in space for 43 days in 1965,[3] with the next test of a nuclear reactor power system intended for space use occurring on 13 September 2012 with the Demonstration Using Flattop Fission (DUFF) test of the Kilopower reactor.[4]
Expand Down

0 comments on commit 640938a

Please sign in to comment.