Skip to content

Commit

Permalink
fix internals check
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Oct 17, 2023
1 parent 473fb3f commit 946f0a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shard.lock
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ shards:

openssl_ext:
git: https://github.com/spider-gazelle/openssl_ext.git
version: 2.3.0
version: 2.4.4

opentelemetry-api:
git: https://github.com/wyhaines/opentelemetry-api.cr.git
Expand Down
2 changes: 1 addition & 1 deletion src/placeos-rest-api/controllers/chat_gpt.cr
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module PlaceOS::Api
record Config, api_key : String, api_base : String?

protected def config
if internals = authority.internals["openai"]
if internals = authority.internals["openai"]?
key = internals["api_key"]?.try &.as_s || Api::OPENAI_API_KEY || raise Error::NotFound.new("missing openai api_key configuration")
Config.new(key, internals["api_base"]?.try &.as_s || Api::OPENAI_API_BASE)
else
Expand Down

0 comments on commit 946f0a1

Please sign in to comment.