You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -76,6 +78,7 @@ class BaseDoclingAgent(BaseModel):
76
78
model: Model
77
79
tools: list[Tool]
78
80
chat_history: list[ChatMessage]
81
+
max_iteration: int=16
79
82
80
83
classConfig:
81
84
arbitrary_types_allowed=True# Needed for complex types like Model
@@ -141,18 +144,22 @@ class DoclingWritingAgent(BaseDoclingAgent):
141
144
142
145
...
143
146
144
-
## References
147
+
## <final section header>
145
148
146
149
list: <1 sentence summary of what the list enumerates>
147
150
```
148
151
149
-
Make sure that the Markdown outline is always enclosed in ```markdown <markdown-content>```!
152
+
Make sure that the Markdown outline is always enclosed in ```markdown <markdown-content>```!
150
153
"""
151
154
152
155
system_prompt_expert_writer: ClassVar[
153
156
str
154
-
] ="""You are an expert writer that needs to write a single paragraph, table
155
-
or nested list based on a summary. Really stick to the summary and be specific, but do not write on adjacent topics
157
+
] ="""You are an expert writer that needs to write a single paragraph, table or nested list based on a summary. Really stick to the summary and be specific, but do not write on adjacent topics.
158
+
"""
159
+
160
+
system_prompt_expert_table_writer: ClassVar[
161
+
str
162
+
] ="""You are an expert writer that needs to write a single HTML table based on a summary. Really stick to the summary. Try to make interesting tables and leverage multi-column headers. If you have units in the table, make sure the units are in the column or row-headers of the table.
"text": f"I see now markdown section. Please try again and add a markdown section in the format ```markdown <insert-content>``` for task: {task}!",
271
+
}
272
+
],
273
+
)
274
+
)
275
+
continue
276
+
eliflen(results) >1:
277
+
chat_messages.append(
278
+
ChatMessage(
279
+
role=MessageRole.USER,
280
+
content=[
281
+
{
282
+
"type": "text",
283
+
"text": f"I see multiple markdown sections. Please try again and only add a single markdown section in the format ```markdown <insert-content>``` for task: {task}!",
284
+
}
285
+
],
286
+
)
287
+
)
288
+
continue
289
+
else:
290
+
logger.info("We obtained a markdown for the outline!")
0 commit comments