Skip to content

Commit 84b4a8b

Browse files
authored
Merge pull request #14 from SamueleMartini/main
Cast to string config output to be compatible with OpenAI sdk
2 parents cc9d7c5 + eadb9b8 commit 84b4a8b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Model/Config.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,30 +37,30 @@ public function IsAsync(): bool
3737
);
3838
}
3939

40-
public function getApiKey(): mixed
40+
public function getApiKey(): string
4141
{
42-
return $this->scopeConfig->getValue(
42+
return (string)$this->scopeConfig->getValue(
4343
self::XML_PATH_OPENAI_API_KEY
4444
);
4545
}
4646

47-
public function getOrganizationID(): mixed
47+
public function getOrganizationID(): ?string
4848
{
4949
return $this->scopeConfig->getValue(
5050
self::XML_PATH_OPENAI_ORGANIZATION_ID
5151
);
5252
}
5353

54-
public function getProjectId(): mixed
54+
public function getProjectId(): ?string
5555
{
5656
return $this->scopeConfig->getValue(
5757
self::XML_PATH_OPENAI_PROJECT_ID
5858
);
5959
}
6060

61-
public function getApiModel(): mixed
61+
public function getApiModel(): string
6262
{
63-
return $this->scopeConfig->getValue(
63+
return (string)$this->scopeConfig->getValue(
6464
self::XML_PATH_OPENAI_API_MODEL
6565
);
6666
}

0 commit comments

Comments
 (0)