Skip to content

Commit

Permalink
Merge pull request #2073 from bocklucas/ft-add-ollama
Browse files Browse the repository at this point in the history
Adding Ollama Support
  • Loading branch information
AmruthPillai authored Oct 13, 2024
2 parents 1bed63a + 6e25780 commit e29f973
Show file tree
Hide file tree
Showing 53 changed files with 2,260 additions and 1,079 deletions.
2 changes: 2 additions & 0 deletions apps/client/src/constants/llm.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export const DEFAULT_MODEL = "gpt-3.5-turbo";
export const DEFAULT_MAX_TOKENS = 1024
69 changes: 46 additions & 23 deletions apps/client/src/locales/af-ZA/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ msgstr ""
msgid "<0>I'm sure the app is not perfect, but I'd like for it to be.</0><1>If you faced any issues while creating your resume, or have an idea that would help you and other users in creating your resume more easily, drop an issue on the repository or send me an email about it.</1>"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:126
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:205
msgid "<0>Note: </0>By utilizing the OpenAI API, you acknowledge and accept the <1>terms of use</1> and <2>privacy policy</2> outlined by OpenAI. Please note that Reactive Resume bears no responsibility for any improper or unauthorized utilization of the service, and any resulting repercussions or liabilities solely rest on the user."
msgstr ""

Expand Down Expand Up @@ -146,10 +146,6 @@ msgstr ""
msgid "Anyone with this link can view and download the resume. Share it on your profile or with recruiters."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:83
msgid "API Key"
msgstr ""

#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx:124
msgid "Are you sure you want to delete this item?"
msgstr ""
Expand Down Expand Up @@ -209,6 +205,10 @@ msgstr ""
msgid "Backup Codes may contain only lowercase letters or numbers, and must be exactly 10 characters."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:133
msgid "Base URL"
msgstr ""

#: apps/client/src/pages/builder/sidebars/left/index.tsx:55
msgctxt "The basics section of a resume consists of User's Picture, Full Name, Location etc."
msgid "Basics"
Expand Down Expand Up @@ -575,7 +575,7 @@ msgstr ""
msgid "For example, information regarding which companies you sent this resume to or the links to the job descriptions can be noted down here."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:107
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:186
msgid "Forget"
msgstr ""

Expand Down Expand Up @@ -914,10 +914,18 @@ msgstr ""
msgid "Margin"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:159
msgid "Max Tokens"
msgstr ""

#: apps/client/src/pages/home/sections/features/index.tsx:48
msgid "MIT License"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:146
msgid "Model"
msgstr ""

#: apps/client/src/pages/auth/register/page.tsx:98
#: apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx:58
#: apps/client/src/pages/builder/sidebars/left/dialogs/interests.tsx:48
Expand Down Expand Up @@ -961,6 +969,10 @@ msgstr ""
msgid "Notes"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:101
msgid "Ollama Integration"
msgstr ""

#: apps/client/src/pages/auth/verify-otp/page.tsx:82
msgid "One-Time Password"
msgstr ""
Expand All @@ -982,13 +994,17 @@ msgstr ""
msgid "Open Source"
msgstr ""

#: apps/client/src/services/openai/change-tone.ts:30
#: apps/client/src/services/openai/fix-grammar.ts:28
#: apps/client/src/services/openai/improve-writing.ts:28
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:120
msgid "OpenAI / Ollama API Key"
msgstr ""

#: apps/client/src/services/openai/change-tone.ts:34
#: apps/client/src/services/openai/fix-grammar.ts:32
#: apps/client/src/services/openai/improve-writing.ts:32
msgid "OpenAI did not return any choices for your text."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:52
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:77
#: apps/client/src/pages/home/sections/features/index.tsx:52
msgid "OpenAI Integration"
msgstr ""
Expand Down Expand Up @@ -1213,6 +1229,14 @@ msgstr ""
msgid "Save Changes"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:180
msgid "Save Locally"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:180
msgid "Saved"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx:168
msgid "Scan the QR code below with your authenticator app to setup 2FA on your account."
msgstr ""
Expand Down Expand Up @@ -1376,18 +1400,10 @@ msgstr ""
msgid "Statistics are available only for public resumes."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:101
msgid "Store Locally"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx:162
msgid "Store your backup codes securely"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:101
msgid "Stored"
msgstr ""

#: apps/client/src/pages/builder/sidebars/left/dialogs/awards.tsx:101
#: apps/client/src/pages/builder/sidebars/left/dialogs/certifications.tsx:95
#: apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx:128
Expand Down Expand Up @@ -1433,10 +1449,14 @@ msgstr ""
msgid "Text Color"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:25
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:26
msgid "That doesn't look like a valid OpenAI API key."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:30
msgid "That doesn't look like a valid URL"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/security.tsx:34
msgid "The passwords you entered do not match."
msgstr ""
Expand Down Expand Up @@ -1660,15 +1680,19 @@ msgstr ""
msgid "You can also enter your username."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:54
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:105
msgid "You can integrate with Ollama simply by setting the API key to `sk-1234567890abcdef` and the Base URL to your Ollama URL, i.e. `http://localhost:11434/v1`. You can also pick and choose models and set the max tokens."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:79
msgid "You can make use of the OpenAI API to help you generate content, or improve your writing while composing your resume."
msgstr ""

#: apps/client/src/pages/builder/sidebars/right/sections/statistics.tsx:40
msgid "You can track the number of views your resume has received, or how many people have downloaded the resume by enabling public sharing."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:60
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:85
msgid "You have the option to <0>obtain your own OpenAI API key</0>. This key empowers you to leverage the API as you see fit. Alternatively, if you wish to disable the AI features in Reactive Resume altogether, you can simply remove the key from your settings."
msgstr ""

Expand All @@ -1685,7 +1709,7 @@ msgstr ""
msgid "Your account and all your data has been deleted successfully. Goodbye!"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:116
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:195
msgid "Your API key is securely stored in the browser's local storage and is only utilized when making requests to OpenAI via their official SDK. Rest assured that your key is not transmitted to any external server except when interacting with OpenAI's services."
msgstr ""

Expand All @@ -1708,4 +1732,3 @@ msgstr ""
#: apps/client/src/pages/builder/_components/toolbar.tsx:100
msgid "Zoom Out"
msgstr ""

69 changes: 46 additions & 23 deletions apps/client/src/locales/am-ET/messages.po
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ msgstr ""
msgid "<0>I'm sure the app is not perfect, but I'd like for it to be.</0><1>If you faced any issues while creating your resume, or have an idea that would help you and other users in creating your resume more easily, drop an issue on the repository or send me an email about it.</1>"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:126
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:205
msgid "<0>Note: </0>By utilizing the OpenAI API, you acknowledge and accept the <1>terms of use</1> and <2>privacy policy</2> outlined by OpenAI. Please note that Reactive Resume bears no responsibility for any improper or unauthorized utilization of the service, and any resulting repercussions or liabilities solely rest on the user."
msgstr ""

Expand Down Expand Up @@ -146,10 +146,6 @@ msgstr ""
msgid "Anyone with this link can view and download the resume. Share it on your profile or with recruiters."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:83
msgid "API Key"
msgstr ""

#: apps/client/src/pages/builder/sidebars/left/sections/shared/section-dialog.tsx:124
msgid "Are you sure you want to delete this item?"
msgstr ""
Expand Down Expand Up @@ -209,6 +205,10 @@ msgstr ""
msgid "Backup Codes may contain only lowercase letters or numbers, and must be exactly 10 characters."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:133
msgid "Base URL"
msgstr ""

#: apps/client/src/pages/builder/sidebars/left/index.tsx:55
msgctxt "The basics section of a resume consists of User's Picture, Full Name, Location etc."
msgid "Basics"
Expand Down Expand Up @@ -575,7 +575,7 @@ msgstr ""
msgid "For example, information regarding which companies you sent this resume to or the links to the job descriptions can be noted down here."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:107
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:186
msgid "Forget"
msgstr ""

Expand Down Expand Up @@ -914,10 +914,18 @@ msgstr ""
msgid "Margin"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:159
msgid "Max Tokens"
msgstr ""

#: apps/client/src/pages/home/sections/features/index.tsx:48
msgid "MIT License"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:146
msgid "Model"
msgstr ""

#: apps/client/src/pages/auth/register/page.tsx:98
#: apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx:58
#: apps/client/src/pages/builder/sidebars/left/dialogs/interests.tsx:48
Expand Down Expand Up @@ -961,6 +969,10 @@ msgstr ""
msgid "Notes"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:101
msgid "Ollama Integration"
msgstr ""

#: apps/client/src/pages/auth/verify-otp/page.tsx:82
msgid "One-Time Password"
msgstr ""
Expand All @@ -982,13 +994,17 @@ msgstr ""
msgid "Open Source"
msgstr ""

#: apps/client/src/services/openai/change-tone.ts:30
#: apps/client/src/services/openai/fix-grammar.ts:28
#: apps/client/src/services/openai/improve-writing.ts:28
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:120
msgid "OpenAI / Ollama API Key"
msgstr ""

#: apps/client/src/services/openai/change-tone.ts:34
#: apps/client/src/services/openai/fix-grammar.ts:32
#: apps/client/src/services/openai/improve-writing.ts:32
msgid "OpenAI did not return any choices for your text."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:52
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:77
#: apps/client/src/pages/home/sections/features/index.tsx:52
msgid "OpenAI Integration"
msgstr ""
Expand Down Expand Up @@ -1213,6 +1229,14 @@ msgstr ""
msgid "Save Changes"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:180
msgid "Save Locally"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:180
msgid "Saved"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx:168
msgid "Scan the QR code below with your authenticator app to setup 2FA on your account."
msgstr ""
Expand Down Expand Up @@ -1376,18 +1400,10 @@ msgstr ""
msgid "Statistics are available only for public resumes."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:101
msgid "Store Locally"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_dialogs/two-factor.tsx:162
msgid "Store your backup codes securely"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:101
msgid "Stored"
msgstr ""

#: apps/client/src/pages/builder/sidebars/left/dialogs/awards.tsx:101
#: apps/client/src/pages/builder/sidebars/left/dialogs/certifications.tsx:95
#: apps/client/src/pages/builder/sidebars/left/dialogs/custom-section.tsx:128
Expand Down Expand Up @@ -1433,10 +1449,14 @@ msgstr ""
msgid "Text Color"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:25
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:26
msgid "That doesn't look like a valid OpenAI API key."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:30
msgid "That doesn't look like a valid URL"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/security.tsx:34
msgid "The passwords you entered do not match."
msgstr ""
Expand Down Expand Up @@ -1660,15 +1680,19 @@ msgstr ""
msgid "You can also enter your username."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:54
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:105
msgid "You can integrate with Ollama simply by setting the API key to `sk-1234567890abcdef` and the Base URL to your Ollama URL, i.e. `http://localhost:11434/v1`. You can also pick and choose models and set the max tokens."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:79
msgid "You can make use of the OpenAI API to help you generate content, or improve your writing while composing your resume."
msgstr ""

#: apps/client/src/pages/builder/sidebars/right/sections/statistics.tsx:40
msgid "You can track the number of views your resume has received, or how many people have downloaded the resume by enabling public sharing."
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:60
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:85
msgid "You have the option to <0>obtain your own OpenAI API key</0>. This key empowers you to leverage the API as you see fit. Alternatively, if you wish to disable the AI features in Reactive Resume altogether, you can simply remove the key from your settings."
msgstr ""

Expand All @@ -1685,7 +1709,7 @@ msgstr ""
msgid "Your account and all your data has been deleted successfully. Goodbye!"
msgstr ""

#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:116
#: apps/client/src/pages/dashboard/settings/_sections/openai.tsx:195
msgid "Your API key is securely stored in the browser's local storage and is only utilized when making requests to OpenAI via their official SDK. Rest assured that your key is not transmitted to any external server except when interacting with OpenAI's services."
msgstr ""

Expand All @@ -1708,4 +1732,3 @@ msgstr ""
#: apps/client/src/pages/builder/_components/toolbar.tsx:100
msgid "Zoom Out"
msgstr ""

Loading

0 comments on commit e29f973

Please sign in to comment.