From 311e0473bd350bc7300905fd068e5c138803b73c Mon Sep 17 00:00:00 2001 From: Philippe Matray Date: Mon, 23 Dec 2024 11:01:59 +0100 Subject: [PATCH] build: upgrade to net9.0 --- README.md | 64 +++++++++---------- src/SalesPitch/Commands/SalesPitchCommand.cs | 10 +-- .../ChatCompletionCreateResponseExtensions.cs | 2 +- src/SalesPitch/Program.cs | 4 +- src/SalesPitch/SalesPitch.csproj | 18 +++--- 5 files changed, 49 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 7a99823..139ffa7 100644 --- a/README.md +++ b/README.md @@ -1,39 +1,39 @@ # SalesPitch [![Sparkline](https://stars.medv.io/Atypical-Consulting/SalesPitch.svg)](https://stars.medv.io/Atypical-Consulting/SalesPitch) -SalesPitch est une application de génération de pitch de vente utilisant OpenAI GPT-3. Créez des pitchs de vente percutants pour vos produits en quelques étapes simples. +SalesPitch is a sales pitch generation application using OpenAI GPT-4. Create impactful sales pitches for your products in just a few simple steps. ![SalesPitch](./assets/salespitch.png) -## Fonctionnalités - -* Interagit avec OpenAI GPT-3.5 pour générer des pitchs de vente -* Prend en charge plusieurs langues (Français, Anglais, Allemand et Espagnol) -* Comprend plusieurs cadres de pitch de vente - * AIDA (Attention, Interest, Desire, Action) - * PAS (Problem-Agitate-Solve) - * USP (Unique Selling Proposition) - * Features-Benefits - * Storytelling - * WIIFM (What’s In It For Me) - * Youtility - * FAB (Features, Advantages, Benefits) - * HHE (Headline, Hook, Empathy) - * SUSPENSE (Surprise, Uniqueness, Specifics, Promise, Excitement, Newness, Story) -* Interface utilisateur conviviale avec Spectre.Console -* Possibilité d'utiliser des données de démonstration +## Features + +* Interacts with OpenAI GPT-4o to generate sales pitches +* Supports multiple languages (French, English, German, and Spanish) +* Includes various sales pitch frameworks + * AIDA (Attention, Interest, Desire, Action) + * PAS (Problem-Agitate-Solve) + * USP (Unique Selling Proposition) + * Features-Benefits + * Storytelling + * WIIFM (What’s In It For Me) + * Youtility + * FAB (Features, Advantages, Benefits) + * HHE (Headline, Hook, Empathy) + * SUSPENSE (Surprise, Uniqueness, Specifics, Promise, Excitement, Newness, Story) +* User-friendly interface with Spectre.Console +* Ability to use demo data ## Installation -Assurez-vous d'avoir installé .NET 6.0 ou une version ultérieure sur votre machine. +Ensure that you have .NET 9.0 or a later version installed on your machine. -Clonez ce dépôt et naviguez jusqu'au dossier source : +Clone this repository and navigate to the source folder: ```sh git clone https://github.com/user/SalesPitch.git cd SalesPitch ``` -Installez les dépendances et construisez le projet : +Install the dependencies and build the project: ```sh dotnet restore @@ -42,8 +42,8 @@ dotnet build --configuration Release ## Configuration -1. Obtenez une clé API auprès d'OpenAI (https://beta.openai.com/signup/) -2. Créez un fichier appsettings.json à la racine du projet avec la clé API : +1. Obtain an API key from OpenAI ([https://beta.openai.com/signup/](https://beta.openai.com/signup/)) +2. Create an `appsettings.json` file at the root of the project with the API key: ```json { @@ -54,28 +54,28 @@ dotnet build --configuration Release } ``` -## Utilisation +## Usage -Exécutez l'application en utilisant la commande suivante à la racine du projet : +Run the application using the following command at the root of the project: ```sh dotnet run --configuration Release --project src/SalesPitch ``` -L'application vous guidera à travers plusieurs étapes pour générer un pitch de vente pour votre produit. Vous pouvez également utiliser les données de démonstration pour voir comment l'application fonctionne. +The application will guide you through several steps to generate a sales pitch for your product. You can also use the demo data to see how the application works. ## Contribution -Si vous souhaitez contribuer à ce projet, veuillez soumettre une pull request ou ouvrir une issue dans le dépôt GitHub. +If you wish to contribute to this project, please submit a pull request or open an issue in the GitHub repository. -## Licence +## License -Ce projet est sous licence MIT. Voir le fichier [LICENSE](LICENSE) pour plus de détails. +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details. -## Remerciements +## Acknowledgments -Cette application a été inspirée l'article suivant : [Write A Great Chat GPT Sales Pitch in 5 Steps](https://txtly.ai/write-a-chat-gpt-sales-pitch/) +This application was inspired by the following article: [Write A Great Chat GPT Sales Pitch in 5 Steps](https://txtly.ai/write-a-chat-gpt-sales-pitch/) * [OpenAI](https://openai.com/) * [Spectre.Console](https://spectreconsole.net/) -* [Betalgo.OpenAI.GPT3](https://github.com/betalgo/openai) \ No newline at end of file +* [Betalgo.OpenAI](https://github.com/betalgo/openai) \ No newline at end of file diff --git a/src/SalesPitch/Commands/SalesPitchCommand.cs b/src/SalesPitch/Commands/SalesPitchCommand.cs index 727cfe8..bf9498f 100644 --- a/src/SalesPitch/Commands/SalesPitchCommand.cs +++ b/src/SalesPitch/Commands/SalesPitchCommand.cs @@ -1,7 +1,7 @@ -using OpenAI.Interfaces; -using OpenAI.ObjectModels; -using OpenAI.ObjectModels.RequestModels; -using OpenAI.ObjectModels.ResponseModels; +using Betalgo.Ranul.OpenAI.Interfaces; +using Betalgo.Ranul.OpenAI.ObjectModels; +using Betalgo.Ranul.OpenAI.ObjectModels.RequestModels; +using Betalgo.Ranul.OpenAI.ObjectModels.ResponseModels; using SalesPitch.Extensions; using SalesPitch.Services.Language; using Spectre.Console; @@ -100,7 +100,7 @@ public override async Task ExecuteAsync( // Send the request and process the response var completionResult = _openAIService.ChatCompletion - .CreateCompletionAsStream(request, Models.Gpt_3_5_Turbo); + .CreateCompletionAsStream(request, Models.Chatgpt_4o_latest); await foreach (ChatCompletionCreateResponse completion in completionResult) { diff --git a/src/SalesPitch/Extensions/ChatCompletionCreateResponseExtensions.cs b/src/SalesPitch/Extensions/ChatCompletionCreateResponseExtensions.cs index 311bf55..02dbbd9 100644 --- a/src/SalesPitch/Extensions/ChatCompletionCreateResponseExtensions.cs +++ b/src/SalesPitch/Extensions/ChatCompletionCreateResponseExtensions.cs @@ -1,4 +1,4 @@ -using OpenAI.ObjectModels.ResponseModels; +using Betalgo.Ranul.OpenAI.ObjectModels.ResponseModels; namespace SalesPitch.Extensions; diff --git a/src/SalesPitch/Program.cs b/src/SalesPitch/Program.cs index b4e4eef..8e8f610 100644 --- a/src/SalesPitch/Program.cs +++ b/src/SalesPitch/Program.cs @@ -1,6 +1,6 @@ -using Microsoft.Extensions.Configuration; +using Betalgo.Ranul.OpenAI.Extensions; +using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; -using OpenAI.Extensions; using Spectre.Console.Cli; using SalesPitch.Commands; using SalesPitch.Services.Language; diff --git a/src/SalesPitch/SalesPitch.csproj b/src/SalesPitch/SalesPitch.csproj index 0c46b43..5dcadbe 100644 --- a/src/SalesPitch/SalesPitch.csproj +++ b/src/SalesPitch/SalesPitch.csproj @@ -2,24 +2,24 @@ Exe - net7.0 + net9.0 enable enable 458c1c01-d3e1-4d45-9846-e8beb07f93ce - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive - +