Here you have a complete and optimized presentation for your project in Github, integrating the capabilities of Taicat, Taiaudio and Taidalle:
Taicat is a component designed to simplify the integration of artificial intelligence language models (LLM) in applications developed with Delphi. This project provides tools to interact with multiple leaders in the industry, such as OpenAi, Anthropic, Gemini and more, providing flexibility and power to developers to create innovative solutions.
The project also includes additional components, Taiaudio and Taidalle , which expand the capacities to audio transcription, voice synthesis, and image generation.
var
Chat: TAiChat;
begin
Chat := TAiChat.Create( nil );
try
Chat.ApiKey := ' tu-api-key ' ;
Chat.Model := ' gpt-4 ' ;
Chat.AddMessage( ' ¿Cuál es la capital de Francia? ' , ' user ' );
ShowMessage(Chat.Run);
finally
Chat.Free;
end ;
end ; var
AiAudio: TAiAudio;
TranscriptionText: String;
begin
AiAudio := TAiAudio.Create( nil );
try
AiAudio.ApiKey := ' tu-api-key ' ;
TranscriptionText := AiAudio.Transcription( ' ruta/audio.mp3 ' , ' audio.mp3 ' , ' Transcribe esto ' );
ShowMessage(TranscriptionText);
finally
AiAudio.Free;
end ;
end ; var
DalleComponent: TAiDalle;
GeneratedImage: TAiDalleFile;
begin
DalleComponent := TAiDalle.Create( nil );
try
DalleComponent.ApiKey := ' tu-api-key ' ;
GeneratedImage := DalleComponent.Generate(
' Un bosque encantado al atardecer ' ,
TiaSize1024, // 1024x1024
1 // Generar 1 imagen
);
GeneratedImage.Image.SaveToFile( ' bosque.png ' );
finally
DalleComponent.Free;
end ;
end ;System.Net.HttpClientSystem.JSONREST.ClientApiKey ).This project is under the MIT license.
Gustavo Enriquez
Do you want to contribute? Feel free to make a fork and propose improvements!