Skip to content

Commit

Permalink
update python to change artifact to document generator
Browse files Browse the repository at this point in the history
  • Loading branch information
leehuwuj committed Sep 27, 2024
1 parent 493d6f2 commit f51c8d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,13 +163,13 @@ def generate_document(
cls, original_content: str, document_type: str, file_name: str
) -> str:
"""
To generate artifact as PDF or HTML file.
To generate document as PDF or HTML file.
Parameters:
original_content: str (markdown style)
document_type: str (pdf or html) specify the type of the file format based on the use case
file_name: str (name of the artifact file) must be a valid file name, no extensions needed
file_name: str (name of the document file) must be a valid file name, no extensions needed
Returns:
str (URL to the artifact file): A file URL ready to serve.
str (URL to the document file): A file URL ready to serve.
"""
try:
document_type = DocumentType(document_type.lower())
Expand All @@ -180,7 +180,7 @@ def generate_document(
# Always generate html content first
html_content = cls._generate_html_content(original_content)

# Based on the type of artifact, generate the corresponding file
# Based on the type of document, generate the corresponding file
if document_type == DocumentType.PDF:
content = cls._generate_pdf(html_content)
file_extension = "pdf"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def create_choreography(chat_history: Optional[List[ChatMessage]] = None):
system_prompt="""You are an expert in writing blog posts. You are given a task to write a blog post. Before starting to write the post, consult the researcher agent to get the information you need. Don't make up any information yourself.
After creating a draft for the post, send it to the reviewer agent to receive some feedback and make sure to incorporate the feedback from the reviewer.
You can consult the reviewer and researcher maximal two times. Your output should just contain the blog post.
Finally, always request the publisher to create an artifact (pdf, html) and publish the blog post.""",
Finally, always request the publisher to create an document (pdf, html) and publish the blog post.""",
# TODO: add chat_history support to AgentCallingAgent
# chat_history=chat_history,
verbose=True,
Expand Down

0 comments on commit f51c8d3

Please sign in to comment.