Skip to content

Commit f8e022a

Browse files
committed
Make createModelForPlatform method static
- Change createModelForPlatform from instance to static method - Update method call to use self::createModelForPlatform() - Method doesn't use any instance properties, so static is more appropriate
1 parent 39e4538 commit f8e022a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ai-bundle/src/Command/PlatformInvokeCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ protected function initialize(InputInterface $input, OutputInterface $output): v
104104
throw new InvalidArgumentException('Model is required.');
105105
}
106106

107-
$this->model = $this->createModelForPlatform($platformName, $modelName);
107+
$this->model = self::createModelForPlatform($platformName, $modelName);
108108

109109
$this->message = trim((string) $input->getArgument('message'));
110110

@@ -148,7 +148,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
148148
return Command::SUCCESS;
149149
}
150150

151-
private function createModelForPlatform(string $platformName, string $modelName): Model
151+
private static function createModelForPlatform(string $platformName, string $modelName): Model
152152
{
153153
return match ($platformName) {
154154
'openai' => new \Symfony\AI\Platform\Bridge\OpenAi\Gpt($modelName),

0 commit comments

Comments
 (0)