GithubHelp home page GithubHelp logo

Comments (7)

Aidan-Huang avatar Aidan-Huang commented on September 22, 2024

EDIT: REDACTED

from just-read.

Aidan-Huang avatar Aidan-Huang commented on September 22, 2024

And I can use it in NextChat
image

from just-read.

ZachSaucier avatar ZachSaucier commented on September 22, 2024

Hey Aidan. This is because the API that you're calling is returning HTML when Just Read is expecting JSON. The summarizer functionality was made for just OpenAI or things that respond with the same format.

I could update Just Read to allow for an arbitrary HTML response and have that be displayed directly within the Just Read view. Would that work for your use case?

By the way, you shouldn't share your key in public! I deleted the revision history for you. In the future, if you need to share a secure piece of information, something more private like email is better.

from just-read.

Aidan-Huang avatar Aidan-Huang commented on September 22, 2024

First of all, thank you for your reply, I believe the solution you provided can solve this problem. Really appreicately your greatwork, it's very useful to me and I look forward to your updates.

Will the update provide an option for users to decide whether to return HTML or JSON?

In addition, thank you for helping me hide the key. If there is a similar situation in the future, I will operate according to your suggestion.

from just-read.

ZachSaucier avatar ZachSaucier commented on September 22, 2024

Will the update provide an option for users to decide whether to return HTML or JSON?

Yeah, it will have to be something like that. It will take me some time to think through how to best handle this sort of thing.

from just-read.

ZachSaucier avatar ZachSaucier commented on September 22, 2024

When I attempt to use your service using the way that you provided, this is the response that I get:

<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="logo.png"/><link rel="apple-touch-icon" href="/logo.png"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#ffffff"/><meta name="description" content="头顶冒火,OpenAI API 接口转发站。"/><title>头顶冒火 🤯</title><script defer="defer" src="/static/js/main.5a762519.js"></script><link href="/static/css/main.54631fc9.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

This loads a blank page. Even when I change the response to add the baseUrl that you provide, it gives me this page, which is a 404 error:

Screenshot 2024-04-13 at 5 52 23 PM

As such, while I'm open to adding support for a generic HTML response for this feature, your use case, at least as is, doesn't make work. Unfortunately I don't have the time to try and figure out how to make this endpoint work, especially given it is all in Chinese, haha

from just-read.

ZachSaucier avatar ZachSaucier commented on September 22, 2024

The latest version of Just Read should handle a generic HTML response and put it inside of an iframe within the Just Read view. So I'm going to mark this request as completed.

Good luck figuring out how to get this service working correctly!

from just-read.

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.