Coder Social home page Coder Social logo

Comments (5)

zmh-program avatar zmh-program commented on July 24, 2024

看文档去。

from chatnio.

zjjxwhh avatar zjjxwhh commented on July 24, 2024

image

必须要输入图片 url 直链,不可以直接用上传文件的方式?

那 README 里的这种效果是怎么实现的?不太明白,麻烦大佬指点一下,感谢!

image

from chatnio.

zmh-program avatar zmh-program commented on July 24, 2024

后台设置自定义文件解析服务,看解析项目文档

from chatnio.

zjjxwhh avatar zjjxwhh commented on July 24, 2024

感谢大佬回复,我在 docker 中部署 chatnio-blob-service 试了一下:

  1. 配置成 No Storage 的时候,上传图片会被转换,chatnio 那边可以正确调用 gpt 并且获得回复,这个没问题
  2. 配置成 Local Storage 的时候,还是会有本 issue 最开始提到的问题:请求 gpt 的时候,body 中的 image_url 字段中图片 url 结尾会多一个 \n```,导致请求失败;而且我看 text 字段开头有 ```,但是结尾没有,看上去像是一个完整的 markdown 代码块被分割之后,前半段塞到了 text 字段,后半段塞到了 image_url 字段,这个麻烦大佬有空再看下,可以参考我开头贴的日志

预祝大佬中考顺利~

from chatnio.

zmh-program avatar zmh-program commented on July 24, 2024

抱歉,无法复现

image

chatnio 提取图片实现为此函数,复制并最小化demo没有发现问题

chatnio/utils/char.go

Lines 229 to 234 in f860a99

func ExtractExternalImages(data string) []string {
// https://platform.openai.com/docs/guides/vision/what-type-of-files-can-i-upload
re := regexp.MustCompile(`(https?://\S+\.(?:png|jpg|jpeg|gif|webp|heif|heic)(?:\s\S+)?)`)
return re.FindAllString(data, -1)
}

如果不是 chatnio 最新版,请按照 README 更新容器。

from chatnio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.