diff --git a/.env.example b/.env.example index 9a0c67b..8c51384 100644 --- a/.env.example +++ b/.env.example @@ -21,6 +21,8 @@ FEEDLY_TOKEN= # Head over to https://openai.com/ to get your token and organization id. OPENAI_ACCESS_TOKEN= OPENAI_ORGANIZATION_ID= +# Pick the ChatGPT Model (gpt-4 or gpt-3.5-turbo) +OPENAI_GPT_MODEL=gpt-3.5-turbo # Head over to https://www.thenextleg.io/, create an account, configure midjourney, and get your token. NEXT_LEG_TOKEN= @@ -48,8 +50,4 @@ DYNAMIC_THROTTLE = true # Toggle Social Networks TWITTER_ENABLED = TRUE LINKEDIN_ENABLED = TRUE -PINTEREST_ENABLED = TRUE - -# This will strip out the hashtags from the tweet and replace them with -# Trending real-time hashtags from Ayrshare -AUTOMATIC_HASHTAGS = TRUE \ No newline at end of file +PINTEREST_ENABLED = TRUE \ No newline at end of file diff --git a/.github/workflows/ruby_on_rails.yml b/.github/workflows/ruby_on_rails.yml index da8f53b..6f0ca02 100644 --- a/.github/workflows/ruby_on_rails.yml +++ b/.github/workflows/ruby_on_rails.yml @@ -31,6 +31,7 @@ jobs: NEXT_LEG_TOKEN: ${{ secrets.NEXT_LEG_TOKEN }} OPENAI_ACCESS_TOKEN: ${{ secrets.OPENAI_ACCESS_TOKEN }} OPENAI_ORGANIZATION_ID: ${{ secrets.OPENAI_ORGANIZATION_ID }} + OPENAI_GPT_MODEL: gpt-3.5-turbo ORGANIZATION: ${{ secrets.ORGANIZATION }} STORYPRO_API_KEY: ${{ secrets.STORYPRO_API_KEY }} STORYPRO_API_URL: ${{ secrets.STORYPRO_API_URL }} diff --git a/README.md b/README.md index 7f77617..7fa2866 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Compliance with applicable laws, regulations, and ethical standards is essential Responsible and ethical use of AI-generated content is imperative to avoid harmful consequences, such as spreading misinformation, creating offensive material, or infringing upon others' rights. Users are solely responsible for preventing these negative outcomes. By using QuasarAI, you agree to the following terms and conditions: -1. Acknowledge that QuasarAI utilizes generative AI technology, including OpenAI's GPT-3.5-turbo model and Midjourney's image generation models. +1. Acknowledge that QuasarAI utilizes generative AI technology, including OpenAI's GPT models and Midjourney's image generation models. 2. Assume full responsibility and legal liability for any content, including text and images, generated by the AI models integrated within QuasarAI. 3. Understand that QuasarAI and its contributors are not liable for any consequences arising from the content generated by the AI models, including accuracy, legality, or ethical implications. 4. Agree to comply with all applicable laws, regulations, and ethical standards in your jurisdiction when using generative AI and its content. Ensure the generated content does not infringe upon rights, violate laws, or contravene regulations. @@ -53,7 +53,7 @@ By using QuasarAI or any content generated by its AI integrations, including tex For the specific terms and conditions governing the usage of Midjourney's image generation models, please refer to [Midjourney's Terms of Service](https://docs.midjourney.com/docs/terms-of-service). -For the specific terms and conditions governing the usage of OpenAI's GPT-3.5-turbo model (ChatGPT), please refer to [OpenAI's Terms of Service](https://openai.com/policies/terms-of-use). +For the specific terms and conditions governing the usage of OpenAI's GPT models (ChatGPT), please refer to [OpenAI's Terms of Service](https://openai.com/policies/terms-of-use). This comprehensive and legally sound disclaimer aims to mitigate potential legal risks and promote responsible and ethical use of QuasarAI and its AI integrations. Review and understand these terms and conditions, along with the respective Terms of Service, before using QuasarAI or any content generated by its AI models. @@ -65,7 +65,7 @@ Join us on this exciting journey as we redefine the future of journalism togethe ### Required - [Feedly](https://feedly.com/i/welcome) – Stellar News Aggregation ($12/month for Pro+ Plan) - [OpenAI](https://beta.openai.com/) – Cosmic Content Creation (We are using gpt-3.5-turbo which costs $0.002 per 1000/tokens) -- [NexLeg](https://nexleg.com/) – Futuristic Visual Storytelling ($40/month for API Acccess + $30/month from Midjourney) +- [NexLeg](https://nexleg.com/) – Futuristic Visual Storytelling ($40/month for API Access + $30/month from Midjourney) __Total:__ $82/month + OpenAI Costs diff --git a/app/jobs/discussions/make_stem_job.rb b/app/jobs/discussions/make_stem_job.rb index 16e9139..512dd8e 100644 --- a/app/jobs/discussions/make_stem_job.rb +++ b/app/jobs/discussions/make_stem_job.rb @@ -100,7 +100,7 @@ def valid_json?(json_string) def chat(messages:) @client.chat( parameters: { - model: "gpt-3.5-turbo", # Required. + model: ENV['OPENAI_GPT_MODEL'], # Required. messages:, temperature: 0.7 } diff --git a/app/jobs/images/create_image_idea_job.rb b/app/jobs/images/create_image_idea_job.rb index 3b54d94..8db507f 100644 --- a/app/jobs/images/create_image_idea_job.rb +++ b/app/jobs/images/create_image_idea_job.rb @@ -82,7 +82,7 @@ def valid_json?(json_string) def chat(messages:) @client.chat( parameters: { - model: "gpt-3.5-turbo", # Required. + model: ENV['OPENAI_GPT_MODEL'], # Required. messages:, temperature: 0.7 } diff --git a/app/jobs/stories/make_stem_job.rb b/app/jobs/stories/make_stem_job.rb index 6d4092a..01e2e99 100644 --- a/app/jobs/stories/make_stem_job.rb +++ b/app/jobs/stories/make_stem_job.rb @@ -106,7 +106,7 @@ def valid_json?(json_string) def chat(messages:) @client.chat( parameters: { - model: "gpt-3.5-turbo", # Required. + model: ENV['OPENAI_GPT_MODEL'], # Required. messages:, temperature: 0.7 } diff --git a/app/jobs/tweets/make_stem_job.rb b/app/jobs/tweets/make_stem_job.rb index 0f07b16..cd61783 100644 --- a/app/jobs/tweets/make_stem_job.rb +++ b/app/jobs/tweets/make_stem_job.rb @@ -72,7 +72,7 @@ def valid_json?(json_string) def chat(messages:) @client.chat( parameters: { - model: "gpt-3.5-turbo", # Required. + model: ENV['OPENAI_GPT_MODEL'], # Required. messages:, temperature: 0.7 } diff --git a/spec/jobs/discussions/make_stem_job_spec.rb b/spec/jobs/discussions/make_stem_job_spec.rb index a62e354..5a300ed 100644 --- a/spec/jobs/discussions/make_stem_job_spec.rb +++ b/spec/jobs/discussions/make_stem_job_spec.rb @@ -27,7 +27,7 @@ it 'calls the OpenAI client with the correct parameters' do expect(client).to receive(:chat).with( parameters: { - model: "gpt-3.5-turbo", + model: ENV['OPENAI_GPT_MODEL'], messages: anything, temperature: 0.7 }