Skip to content

Commit

Permalink
Replace secrets calls
Browse files Browse the repository at this point in the history
  • Loading branch information
fbacall committed Jan 15, 2025
1 parent 82383bd commit e53ec03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/llm/chatgpt_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ module Llm
class ChatgptService < Service
require 'openai'
def initialize
api_key = Rails.application.secrets&.gpt_api_key
api_key = Rails.application.config.secrets&.gpt_api_key
@client = OpenAI::Client.new(access_token: api_key)
@params = {
# max_tokens: 50,
Expand Down
2 changes: 1 addition & 1 deletion lib/llm/willma_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def call(prompt)
def do_request(url, mode, data = {})
header = {
'Content-Type': 'application/json',
'X-API-KEY': Rails.application.secrets&.willma_api_key
'X-API-KEY': Rails.application.config.secrets&.willma_api_key
}

parsed_url = URI.parse(url)
Expand Down

0 comments on commit e53ec03

Please sign in to comment.