mirror of
https://github.com/OpenBMB/ChatDev.git
synced 2026-05-30 04:08:23 +00:00
14 lines
513 B
Python
14 lines
513 B
Python
'''
|
|
This file contains the Article class that represents an article and its layout.
|
|
'''
|
|
class Article:
|
|
def __init__(self):
|
|
self.content = ""
|
|
self.image_url = ""
|
|
def assign_image(self, image_url):
|
|
self.image_url = image_url
|
|
def generate_layout(self, article_text):
|
|
self.content = article_text
|
|
# Generate markdown layout based on the article content and assigned image
|
|
layout = f"\n\n{self.content}"
|
|
return layout |