Skip to content

Commit

Permalink
Move ChatGPT model specification to an environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
CoralineAda committed Jun 17, 2024
1 parent 065e90f commit 2d77f23
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
OPENAI_ACCESS_TOKEN=
OPENAI_MODEL="gpt-3.5-turbo"
GENERAL_ADMISSION_USERNAME=
GENERAL_ADMISSION_PASSWORD=
NEO4J_URI=neo4j://127.0.0.1:7687/neo4j
Expand Down
2 changes: 1 addition & 1 deletion lib/clients/open_ai.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ def self.request(prompt)
client = OpenAI::Client.new
response = client.chat(
parameters: {
model: "gpt-4o",
model: ENV.fetch("OPENAI_MODEL"),
response_format: { type: "json_object" },
messages: [{ role: "user", content: prompt }],
temperature: 0.7,
Expand Down

0 comments on commit 2d77f23

Please sign in to comment.