llama_index [问题]:Readme中的图片没有嵌入到LlamaHub页面中

ds97pgxw  于 2个月前  发布在  其他
关注(0)|答案(2)|浏览(39)

问题验证

  • 我已在文档和Discord中寻找答案。

问题

大家好!最近我们将 WordLift Vector Store 添加到了集成中。检查 LlamaHub page of the WordLift Vector Store 时,我注意到readme中的logo没有渲染。我该如何解决这个问题?

zvokhttg

zvokhttg1#

要解决在LlamaHub页面上未渲染WordLift矢量商店的readme中的logo的问题,请确保图像URL正确且可访问。README.md中的当前代码片段是:

<picture>
  <img alt="#WordLift" width="200" src="https://wordlift.io/wp-content/uploads/2022/12/logo.svg" style="margin-bottom: 25px;">
</picture>

请确保URL https://wordlift.io/wp-content/uploads/2022/12/logo.svg 是正确的,并且图像可以访问。如果URL正确但图像仍无法渲染,可能是正在显示README的平台存在问题。在这种情况下,您可能需要检查平台是否支持从外部URL渲染图像,或者是否有任何限制1(https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/vector_stores/llama-index-vector-stores-wordlift/README.md)。
此外,LlamaHub平台的markdown渲染引擎已知可能影响图像的显示。具有方法remove_imagesMarkdownReader类可以从markdown内容中删除图像。此方法使用正则表达式查找并删除图像标签:

def remove_images(self, content: str) -> str:
    """Remove images in markdown content."""
    pattern = r"!{1}\[\[(.*)\]\]"
    return re.sub(pattern, "", content)

如果remove_images标志设置为True(默认情况下),则会从markdown内容中删除图像,从而影响它们的显示2(https://github.com/run-llama/llama_index/blob/main/llama-index-integrations/readers/llama-index-readers-file/llama_index/readers/file/markdown/base.py)。
最后,LlamaHub平台具有缓存机制,可能会延迟新徽标图像的更新和渲染。IngestionCache类用于缓存转换结果,如果徽标图像更新过程涉及类似的缓存机制,它可能会延迟渲染新徽标,直到清除或更新缓存3(https://github.com/run-llama/llama_index/blob/main/llama-index-legacy/tests/ingestion/test_cache.py)。

  • 要继续与@dosu交谈,请提及。*
cnh2zyt3

cnh2zyt32#

我建议链接到一个公共托管的镜像,而不是从GitHub仓库中拉取readme文件。同样地,拉取镜像会更加复杂😅

相关问题