Skip to content
Snippets Groups Projects
Verified Commit 02013808 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

comments

parent e28721f3
Branches
No related tags found
1 merge request!63Resolve "Ajouter traduction Anglaise par IA"
......@@ -16,6 +16,7 @@ class AiProviderService
*
* @param string $systemRole The system role to send to the AI provider. E.g. "You are a helpful assistant."
* @param string $prompt The prompt to send to the AI provider
* @param UploadedPicture ...$pictures The pictures to send to the AI provider
* @return array The response from the AI provider.
*/
public function promptWithPictures(string $systemRole, string $prompt, UploadedPicture ...$pictures): array
......@@ -85,6 +86,13 @@ public function promptWithPictures(string $systemRole, string $prompt, UploadedP
return $this->callApi(config('ai-provider.providers.'.$selectedProvider.'.url'), $requestBody);
}
/**
* Prompt the AI provider with a text
*
* @param string $systemRole The system role to send to the AI provider. E.g. "You are a helpful assistant."
* @param string $prompt The prompt to send to the AI provider
* @return array The response from the AI provider.
*/
public function prompt(string $systemRole, string $prompt): array
{
$selectedProvider = config('ai-provider.selected-provider');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment