Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 Feature Request: Add support for pplx api #254

Closed
3 of 4 tasks
hiuxia opened this issue Dec 5, 2023 · 13 comments
Closed
3 of 4 tasks

🚀 Feature Request: Add support for pplx api #254

hiuxia opened this issue Dec 5, 2023 · 13 comments
Labels
enhancement New feature or request

Comments

@hiuxia
Copy link

hiuxia commented Dec 5, 2023

Please confirm the following:

  • I have carefully read the README
  • I have searched through the issues page and didn't find a similar feature request.(Including issue that has been closed)
  • Easydict has been upgraded to the latest version

Feature description

Add support for perplexity ai for translation support, like openai api.

  • The price is cheaper
  • Has online module on its in-house 7b and 70b module.

Use case (optional)

Here are a few preliminary, very unmature ideas:

  • translate the sentence
  • explain the grammar, structure of the sentence.
  • expand the selected sentence
  • Besides, I hope in the future we can integrate with Anki, which is the most effective tool for learning language, by using Ankiconnect.

Proposed solution (optional)

I can provide the an api key($5) and help testing the prompt. Besides I think pplx playground is the best place to try this Api.

Are you willing to submit a PR to implement this feature

  • I'm willing to submit PR
@hiuxia hiuxia added the enhancement New feature or request label Dec 5, 2023
Copy link

github-actions bot commented Dec 5, 2023

Hello hiuxia, Thank you for your first issue contribution 🎉

@hiuxia hiuxia closed this as not planned Won't fix, can't repro, duplicate, stale Dec 6, 2023
@tisfeng
Copy link
Owner

tisfeng commented Dec 6, 2023

Why did you close it?

I haven't had a chance to learn about perplexity ai , which looks like it's also an OpenAI-like service, what's wrong with it?

@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

Sorry for this my stupid misunderstanding. I just thought that this request maybe require too much work for you(捂脸). So I closed it in order not to bother.

@hiuxia hiuxia reopened this Dec 6, 2023
@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

Perplexity is a wonderful third party LLM service that integrates GPT4, claude 2.1 and other functions like image search, generation, video search; It also supports personal prompt for each of your thread by assigning them to collections.

Besides, it provides up to 600 GPT4 and claude 2.1 usage with rapid Internet search(offline is also supported). It also provides 5 dollars quota api for its pro users(which is 20$ like chatgpt), but It always have some coupons like two months free for new subscribers.

This is not an ad.

@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

The reason why I would like to open this issue is that I think this wonderful macos application can definitely serve as an language learning hub (especially for English). With such a beautful UI and excellent design, I think this app can be used to bridge the gap between different different scenarios (maybe by establishing a plugin system?):

  • reading English learning materials and then explain the vocabulary.
  • Ask AI to explain the concepts and then send them to notes app combined with apps like popclip and obsidian
  • select code samples and then ask AI to explain its usage.

Very unmature idea: Maybe this app can not only be used as language dictionary, but also for other aims, like language learning and code explanation.

@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

Because of my own capacity constraints, I can't make a PR by myself. But I will try my best to help you If you have relevant ideas.

@tisfeng
Copy link
Owner

tisfeng commented Dec 6, 2023

Thanks for the introduction, indeed, integrating a 3rd party service is quite a bit of work, especially an LLM service.

Currently Easydict only supports the OpenAI API, so if Perplexity provides an API that is compatible with OpenAI, you can use it directly in Easydict for now. If not, I suggest to find a third-party API conversion service to convert Perplexity's API to something like OpenAI API, e.g. one-api, so that other applications can use it more easily.

one-api is a very good OpenAI API management service, you can submit PR or issue to make one-ap support Perplexity.

@tisfeng
Copy link
Owner

tisfeng commented Dec 6, 2023

Currently, our team's development manpower is insufficient and maintaining a new LLM service is too burdensome, I prefer to use one-ap as a conversion method to access the new LLM.

Of course, if there are partners who are willing to submit PRs, they are certainly welcome.

@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

I have checked one api already and there are already an issue about pplx api integration. Any way, thank you for the support.

@tisfeng
Copy link
Owner

tisfeng commented Dec 6, 2023

Maybe this app can not only be used as language dictionary, but also for other aims, like language learning and code explanation.

Good idea, I've been thinking about it. The problem is that we don't have enough developers in our team, and more importantly, I'm not good at doing some complex feature design and the corresponding UI design.

On the other hand, I have a high demand for new features, and I want the app to be simple and elegant while still being powerful.

@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

So I think a useful plugin system can be pretty useful. At least I think maybe we can extract the APIs to module like other similar app like Bob, and by such way people can surely implement the features more easily and you can save a lot of laborious job.

@hiuxia
Copy link
Author

hiuxia commented Dec 6, 2023

Recently I wrote quiet a few popclip addons and I found they emancipated me from all kinds of tedious jobs. Basically, I think any text processing app would double their productivity with a well designed addon system, the most famous example should be vscode.

@tisfeng
Copy link
Owner

tisfeng commented Dec 6, 2023

At first I thought Easydict was an open source application that everyone could come to PR, so there was no need to have an open plugin system like Bob must have.

But later I realized that the number of developers who can write objc or Swift is too small compared to the number of developers who can write JS, so if I can make a JS plugin system, it can greatly enrich the ecosystem of Easydict.

However, my JS level is very low, I'm afraid I can't design a powerful plugin system similar to PopClip, so I've put it on hold 😔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants