wppconnect-team / WPP4Delphi

WPP4Delphi is an open-source project with the aim of exporting functions from WhatsApp Web for Delphi, which can be used to support the creation of any interaction.
Apache License 2.0
187 stars 61 forks source link
delphi lazarus pascal tinject whats4delphi whatsapp whatsapp-api whatsapp-bot whatsapp-chat whatsapp-web

WPPConnect/WPP4Delphi 📞

WPPConnect Banner

WPPConnect/WPP4Delphi is an open-source project with the aim of exporting functions from WhatsApp Web for Delphi/Lazarus, which can be used to support the creation of any interaction.

Our online channels

Discord Telegram Group WhatsApp Group YouTube

image

image

⚙️ Installation

Installation is done using the boss install command:

boss install github.com/wppconnect-team/WPP4Delphi

⚡️ Quickstart Delphi

Funções

Geração automática de QRCode
Envio de mensagens texto, imagens, videos, áudios e docs
Envio de mensagens lista, botões, links
Busca de contatos, chats, grupos, membros de grupos, lista de bloqueio
Envio de Contatos
Envio de stickers
Sessões Múltiplas
Responder Mensagens
Receber mensagens
Receber mensagens e obter retorno com o id
Enviar localização
e muito mais

Instalação

Dependências:

Tutorial de instalação em vídeo: [Youtube]

Instalação:

⚡️ Quickstart Lazarus

// under construction
Csharp




⚡️ Quickstart OpenAI for Delphi in WPP4Delphi

Csharp Csharp

OpenAI for Delphi é uma biblioteca cliente para conectar-se à API OpenAI. A partir desta biblioteca, você pode usar serviços OpenAI populares, como ChatGPT , em seu aplicativo Delphi ou Lazarus.

Example ChatGPT em Delphi com WPP4Delphi | Demo View

function TfrDemo.AskQuestion(const Question, phoneNumber: string): string;
var
  Request: TCreateCompletionRequest;
  Response: TCreateCompletionResponse;
begin
  Response := nil;
  Request := TCreateCompletionRequest.Create;
  try
    //Request.User := '17981388414'
    Request.Prompt := Question;
    Request.Model := 'text-davinci-003';
    Request.User := phoneNumber;
    Request.MaxTokens := 2048; // Be careful as this can quickly consume your API quota. 
    Response := Client.OpenAI.CreateCompletion(Request);///Client credits in https://github.com/landgraf-dev/openai-delphi

    if Assigned(Response.Choices) and (Response.Choices.Count > 0) then
      Result := phoneNumber + '#' + Response.Choices[0].Text
    else
      Result := phoneNumber + '#' + '';
  finally
    Request.Free;
    Response.Free;
  end;
end;

Mais informações, acesse a OpenAI for Delphi

License

Copyright 2022 WPPConnect Team https://wppconnect-team.github.io/

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.