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

โœจ feat: support the perplexity provider #1339

Merged
merged 3 commits into from
Feb 22, 2024

Conversation

gijigae
Copy link
Contributor

@gijigae gijigae commented Feb 20, 2024

๐Ÿ’ป ๅ˜ๆ›ด็ฑปๅž‹ | Change Type

  • โœจ feat
  • ๐Ÿ› fix
  • โ™ป๏ธ refactor
  • ๐Ÿ’„ style
  • ๐Ÿ”จ chore
  • โšก๏ธ perf
  • ๐Ÿ“ docs

๐Ÿ”€ ๅ˜ๆ›ด่ฏดๆ˜Ž | Description of Change

Added a new model provider, Perplexity, along with the following five models.
image

Corresponding setup section is also added to the Language Model.
image

๐Ÿ“ ่กฅๅ……ไฟกๆฏ | Additional Information

Perplexity AI requires the value of FrequencyPenalty to be greater than 0. Thus, the default value for FrequencyPenalty has been set to 0.1.

Copy link

vercel bot commented Feb 20, 2024

@gijigae is attempting to deploy a commit to the LobeHub Team on Vercel.

A member of the Team first needs to authorize it.

@lobehubbot
Copy link
Member

๐Ÿ‘ @gijigae

Thank you for raising your pull request and contributing to our Community
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.
้žๅธธๆ„Ÿ่ฐขๆ‚จๆๅ‡บๆ‹‰ๅ–่ฏทๆฑ‚ๅนถไธบๆˆ‘ไปฌ็š„็คพๅŒบๅšๅ‡บ่ดก็Œฎ๏ผŒ่ฏท็กฎไฟๆ‚จๅทฒ็ป้ตๅพชไบ†ๆˆ‘ไปฌ็š„่ดก็ŒฎๆŒ‡ๅ—๏ผŒๆˆ‘ไปฌไผšๅฐฝๅฟซๅฎกๆŸฅๅฎƒใ€‚
ๅฆ‚ๆžœๆ‚จ้‡ๅˆฐไปปไฝ•้—ฎ้ข˜๏ผŒ่ฏท้šๆ—ถไธŽๆˆ‘ไปฌ่”็ณปใ€‚

Copy link

codecov bot commented Feb 21, 2024

Codecov Report

Attention: 73 lines in your changes are missing coverage. Please review.

Comparison is base (2b3e457) 86.76% compared to head (c395ba3) 86.30%.
Report is 7 commits behind head on main.

Files Patch % Lines
src/libs/agent-runtime/perplexity/index.ts 19.76% 69 Missing โš ๏ธ
src/app/api/errorResponse.ts 33.33% 2 Missing โš ๏ธ
src/services/_auth.ts 50.00% 2 Missing โš ๏ธ
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1339      +/-   ##
==========================================
- Coverage   86.76%   86.30%   -0.46%     
==========================================
  Files         215      217       +2     
  Lines       10863    11035     +172     
  Branches     1172     1176       +4     
==========================================
+ Hits         9425     9524      +99     
- Misses       1438     1511      +73     

โ˜” View full report in Codecov by Sentry.
๐Ÿ“ข Have feedback on the report? Share it here.

Copy link

vercel bot commented Feb 21, 2024

The latest updates on your projects. Learn more about Vercel for Git โ†—๏ธŽ

Name Status Preview Comments Updated (UTC)
lobe-chat โœ… Ready (Inspect) Visit Preview ๐Ÿ’ฌ Add feedback Feb 21, 2024 2:09pm

Copy link
Contributor

@arvinxx arvinxx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have run the auto translate ( npm run 18n) and update the model list order ( I think pplx model should rank at first ).

And the rest is LGTM. I'll merge it.

Thanks for your contribution! ๐Ÿ‘

@arvinxx arvinxx changed the title โœจ feat: support a new model provider, perplexity โœจ feat: support the perplexity provider Feb 21, 2024
@arvinxx arvinxx merged commit 61c88fb into lobehub:main Feb 22, 2024
4 of 6 checks passed
@lobehubbot
Copy link
Member

โค๏ธ Great PR @gijigae โค๏ธ

The growth of project is inseparable from user feedback and contribution, thanks for your contribution! If you are interesting with the lobehub developer community, please join our discord and then dm @arvinxx or @canisminor1990. They will invite you to our private developer channel. We are talking about the lobe-chat development or sharing ai newsletter around the world.
้กน็›ฎ็š„ๆˆ้•ฟ็ฆปไธๅผ€็”จๆˆทๅ้ฆˆๅ’Œ่ดก็Œฎ๏ผŒๆ„Ÿ่ฐขๆ‚จ็š„่ดก็Œฎ! ๅฆ‚ๆžœๆ‚จๅฏน LobeHub ๅผ€ๅ‘่€…็คพๅŒบๆ„Ÿๅ…ด่ถฃ๏ผŒ่ฏทๅŠ ๅ…ฅๆˆ‘ไปฌ็š„ discord๏ผŒ็„ถๅŽ็งไฟก @arvinxx ๆˆ– @canisminor1990ใ€‚ไป–ไปฌไผš้‚€่ฏทๆ‚จๅŠ ๅ…ฅๆˆ‘ไปฌ็š„็งๅฏ†ๅผ€ๅ‘่€…้ข‘้“ใ€‚ๆˆ‘ไปฌๅฐ†ไผš่ฎจ่ฎบๅ…ณไบŽ Lobe Chat ็š„ๅผ€ๅ‘๏ผŒๅˆ†ไบซๅ’Œ่ฎจ่ฎบๅ…จ็ƒ่Œƒๅ›ดๅ†…็š„ AI ๆถˆๆฏใ€‚

github-actions bot pushed a commit that referenced this pull request Feb 22, 2024
## [Version 0.129.0](v0.128.10...v0.129.0)
<sup>Released on **2024-02-22**</sup>

#### โœจ Features

- **misc**: Support perplexity AI provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support perplexity AI provider, closes [#1339](#1339) ([61c88fb](61c88fb))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@lobehubbot
Copy link
Member

๐ŸŽ‰ This PR is included in version 0.129.0 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€

@arvinxx
Copy link
Contributor

arvinxx commented Feb 22, 2024

@gijigae Oh I just forgot the document, would you mind to add doucment to guide our users to how to config the perplexity provider?

@gijigae
Copy link
Contributor Author

gijigae commented Feb 22, 2024

@gijigae Oh I just forgot the document, would you mind to add doucment to guide our users to how to config the perplexity provider?

Thanks for merging @arvinxx ! For the document, should I add a new document file to the contributing/Basic directory or adding a new line to the docs/usage/features/multi-ai-providers.mdx will suffice? Or both?

@arvinxx
Copy link
Contributor

arvinxx commented Feb 22, 2024

@gijigae We need several documents for different users:

For the users who need self-hosting, add these documents below:

For the users who just use Lobe Chat, add these documents:

  • Provider Intro and Usage add a document about the introduction of perplexity provider.( I will add an example of Ollama soon)
  • Update Multi AI Providers: update the docs/usage/features/multi-ai-providers.mdx and add a link to the doc above.

For the developers , I think we just need a guide of how to add a new provider.
But for this PR, I thinks it's optional. (I will be appreciative If you can write a document about this. It can also be powered by the gpt and crawler plugin๐Ÿ˜„)

github-actions bot pushed a commit to bentwnghk/lobe-chat that referenced this pull request Feb 22, 2024
## [Version&nbsp;1.11.0](v1.10.5...v1.11.0)
<sup>Released on **2024-02-22**</sup>

#### โœจ Features

- **misc**: Support perplexity AI provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support perplexity AI provider, closes [lobehub#1339](https://github.com/bentwnghk/lobe-chat/issues/1339) ([61c88fb](61c88fb))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
@gijigae
Copy link
Contributor Author

gijigae commented Feb 22, 2024

Will prepare those documents including a guide for developers to add a new provider. Regarding "can be powered by the gpt and crawler plugin", what does that mean? There are so many things to learn and I like it ๐Ÿ˜Š.

@arvinxx
Copy link
Contributor

arvinxx commented Feb 22, 2024

Regarding "can be powered by the gpt and crawler plugin", what does that mean?

@gijigae like this:

LobeChat_LobeChat ๆŠ€ๆœฏๆ–‡ๆกฃไธ“ๅฎถ_2024-02-22

You can refers it with this link: https://sharegpt.com/c/G0azkMo

the final document here: https://github.com/lobehub/lobe-chat/blob/main/contributing/Internationalization/Add-New-Locale.zh-CN.md

and I run npm i18n-docs to translate it from Chinese to English. It's super efficiently.

the agent can find here: https://chat-preview.lobehub.com/market?agent=lobe-chat-developer-document-writer

@gijigae gijigae deleted the model-pplx branch February 23, 2024 08:56
hymoe pushed a commit to hymoe/lobe-chat that referenced this pull request Feb 23, 2024
* โœจ feat: support a new model provider, perplexity

* ๐ŸŒ style: update i18n

* ๐Ÿšธ chore: improve model list index
hymoe pushed a commit to hymoe/lobe-chat that referenced this pull request Feb 23, 2024
## [Version&nbsp;0.129.0](lobehub/lobe-chat@v0.128.10...v0.129.0)
<sup>Released on **2024-02-22**</sup>

#### โœจ Features

- **misc**: Support perplexity AI provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support perplexity AI provider, closes [lobehub#1339](lobehub#1339) ([61c88fb](lobehub@61c88fb))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
573dave pushed a commit to 573dave/lobe-chat that referenced this pull request Mar 5, 2024
* โœจ feat: support a new model provider, perplexity

* ๐ŸŒ style: update i18n

* ๐Ÿšธ chore: improve model list index
573dave pushed a commit to 573dave/lobe-chat that referenced this pull request Mar 5, 2024
## [Version&nbsp;0.129.0](lobehub/lobe-chat@v0.128.10...v0.129.0)
<sup>Released on **2024-02-22**</sup>

#### โœจ Features

- **misc**: Support perplexity AI provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support perplexity AI provider, closes [lobehub#1339](lobehub#1339) ([61c88fb](lobehub@61c88fb))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
miroshar-success added a commit to miroshar-success/OpenAI_Integraion_platform that referenced this pull request Apr 5, 2024
## [Version&nbsp;0.129.0](lobehub/lobe-chat@v0.128.10...v0.129.0)
<sup>Released on **2024-02-22**</sup>

#### โœจ Features

- **misc**: Support perplexity AI provider.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Support perplexity AI provider, closes [#1339](lobehub/lobe-chat#1339) ([61c88fb](lobehub/lobe-chat@61c88fb))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants