@@ -120,25 +120,6 @@ def create(
120
120
return asdict (cls (text = content ))
121
121
122
122
123
- @dataclass (slots = True )
124
- class DocumentBase64Msg :
125
- """Document base64 message."""
126
-
127
- text : str
128
- type : Literal ["text" ] = "text"
129
-
130
- @classmethod
131
- def create (
132
- cls , base64_data : str , file_name : str , content_type : str | None
133
- ) -> dict [str , str ]:
134
- """Create base64 document msg."""
135
- if content_type :
136
- data = f"data:{ content_type } ;base64,{ base64_data } "
137
- else :
138
- data = base64_data
139
- return asdict (cls (text = f"document { file_name } , base64: { data } " ))
140
-
141
-
142
123
OAP_MIN_COUNT = 2
143
124
144
125
@@ -183,17 +164,8 @@ async def _gen_document_msg(
183
164
DocumentInfoMsg .create (path = local_path , url = url , file_name = file_name ),
184
165
]
185
166
186
- # Other file types or providers
187
- return [
188
- DocumentBase64Msg .create (
189
- base64_data = base64_content ,
190
- file_name = file_name ,
191
- content_type = content_type ,
192
- )
193
- if base64_content
194
- else {},
195
- DocumentInfoMsg .create (path = local_path , url = url , file_name = file_name ),
196
- ]
167
+ # Other file types or providers, simply pass the document info message
168
+ return [DocumentInfoMsg .create (path = local_path , url = url , file_name = file_name )]
197
169
198
170
async def _gen_image_msg_oap (
199
171
self ,
0 commit comments