Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aidmi
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
aidmi
Commits
1291c742
Commit
1291c742
authored
8 months ago
by
Mike Feranda
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3473721
by mferanda: File settings issue
parent
0433f8a5
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Service/GeminiAiService.php
+5
-1
5 additions, 1 deletion
src/Service/GeminiAiService.php
with
5 additions
and
1 deletion
src/Service/GeminiAiService.php
+
5
−
1
View file @
1291c742
...
...
@@ -36,14 +36,18 @@ class GeminiAiService {
public
function
__construct
(
ConfigFactoryInterface
$configFactory
)
{
$this
->
configFactory
=
$configFactory
;
// Retrieve the configuration for the module
// Retrieve the configuration for the module
.
$config
=
$configFactory
->
get
(
'aidmi.settings'
);
// Get the input method.
$apiInputMethod
=
$config
->
get
(
'api_input_method'
);
// Initialize the API key variable.
$apiKey
=
''
;
// Check if the API key is to be retrieved from the file.
if
(
$apiInputMethod
===
'file_path'
)
{
// Get the API key file path from the configuration.
$apiKeyFilePath
=
$config
->
get
(
'api_key_file_path'
);
$siteRoot
=
\Drupal
::
root
();
// Get the site root.
$fullFilePath
=
$siteRoot
.
'/'
.
ltrim
(
$apiKeyFilePath
,
'/'
);
// Full file path.
// Check if the file exists and is readable.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment