Merge pull request #7 from pathintegral-institute/rong/tech-150-add-kwarg
fix image type
This commit is contained in:
commit
24ac33a1a3
1 changed files with 4 additions and 4 deletions
|
|
@ -87,10 +87,11 @@ class DocumentConverterResult:
|
||||||
# Add the image
|
# Add the image
|
||||||
content.append({
|
content.append({
|
||||||
"type": "image",
|
"type": "image",
|
||||||
"image_url": {
|
"source": {
|
||||||
"url": f"data:{content_type};base64,{b64_data}"
|
"type": "base64",
|
||||||
|
"data": b64_data,
|
||||||
|
"media_type": content_type
|
||||||
},
|
},
|
||||||
"alt_text": alt_text
|
|
||||||
})
|
})
|
||||||
|
|
||||||
last_end = match.end()
|
last_end = match.end()
|
||||||
|
|
@ -104,7 +105,6 @@ class DocumentConverterResult:
|
||||||
"text": text_chunk
|
"text": text_chunk
|
||||||
})
|
})
|
||||||
if self.audio_stream:
|
if self.audio_stream:
|
||||||
print('hello')
|
|
||||||
audio_b64 = base64.b64encode(
|
audio_b64 = base64.b64encode(
|
||||||
self.audio_stream.read()).decode('utf-8')
|
self.audio_stream.read()).decode('utf-8')
|
||||||
content.append({
|
content.append({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue