{"id":13593599,"url":"https://github.com/wieslawsoltes/ChatGPT","last_synced_at":"2025-04-09T05:31:40.539Z","repository":{"id":65714767,"uuid":"574666627","full_name":"wieslawsoltes/ChatGPT","owner":"wieslawsoltes","description":"A ChatGPT C# client for MacOS, Windows, Linux, Android, iOS and Browser. Powered by Avalonia UI framework.","archived":false,"fork":false,"pushed_at":"2024-12-30T17:35:36.000Z","size":249421,"stargazers_count":1450,"open_issues_count":7,"forks_count":221,"subscribers_count":28,"default_branch":"main","last_synced_at":"2025-04-06T00:03:25.764Z","etag":null,"topics":["ai","api","avalonia","avaloniaui","chatgpt","clippy","openai"],"latest_commit_sha":null,"homepage":"https://wieslawsoltes.github.io/ChatGPT/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wieslawsoltes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["wieslawsoltes"]}},"created_at":"2022-12-05T20:17:08.000Z","updated_at":"2025-04-05T13:00:49.000Z","dependencies_parsed_at":"2024-06-16T19:14:28.843Z","dependency_job_id":"be50328a-4e48-4c6a-be7e-48bbe839cf8b","html_url":"https://github.com/wieslawsoltes/ChatGPT","commit_stats":{"total_commits":736,"total_committers":2,"mean_commits":368.0,"dds":"0.0013586956521739468","last_synced_commit":"6144d07c5def0fee3ec44068b790926a6c2e775c"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FChatGPT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FChatGPT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FChatGPT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wieslawsoltes%2FChatGPT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wieslawsoltes","download_url":"https://codeload.github.com/wieslawsoltes/ChatGPT/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247986734,"owners_count":21028886,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","api","avalonia","avaloniaui","chatgpt","clippy","openai"],"created_at":"2024-08-01T16:01:22.045Z","updated_at":"2025-04-09T05:31:40.104Z","avatar_url":"https://github.com/wieslawsoltes.png","language":"C#","funding_links":["https://github.com/sponsors/wieslawsoltes"],"categories":["C#","Uncategorized","C\\#","💻 Desktop","Chat UIs","Applications","UIs"],"sub_categories":["Uncategorized","提示语（魔法）","Desktop applications"],"readme":"# ChatGPT\n\n[![Build Status](https://dev.azure.com/wieslawsoltes/GitHub/_apis/build/status/wieslawsoltes.ChatGPT?repoName=wieslawsoltes%2FChatGPT\u0026branchName=main)](https://dev.azure.com/wieslawsoltes/GitHub/_build/latest?definitionId=109\u0026repoName=wieslawsoltes%2FChatGPT\u0026branchName=main)\n[![CI](https://github.com/wieslawsoltes/ChatGPT/actions/workflows/build.yml/badge.svg?branch=main)](https://github.com/wieslawsoltes/ChatGPT/actions/workflows/build.yml)\n\n[![GitHub release](https://img.shields.io/github/release/wieslawsoltes/ChatGPT.svg)](https://github.com/wieslawsoltes/ChatGPT/releases)\n[![Github All Releases](https://img.shields.io/github/downloads/wieslawsoltes/ChatGPT/total.svg)](https://github.com/wieslawsoltes/ChatGPT/releases)\n[![Github Releases](https://img.shields.io/github/downloads/wieslawsoltes/ChatGPT/latest/total.svg)](https://github.com/wieslawsoltes/ChatGPT/releases)\n\n[![NuGet](https://img.shields.io/nuget/v/ChatGPT.svg)](https://www.nuget.org/packages/ChatGPT)\n[![NuGet](https://img.shields.io/nuget/dt/ChatGPT.svg)](https://www.nuget.org/packages/ChatGPT)\n\nA ChatGPT C# client for graphical user interface runs on MacOS, Windows, Linux, Android, iOS and Browser. Powered by [Avalonia UI](https://avaloniaui.net/) framework.\n\nTo make the app work, you need to set the [OpenAI API key](https://beta.openai.com/account/api-keys) as the `OPENAI_API_KEY` environment variable or set API key directly in app settings.\n\nYou can try client using browser version [here](https://wieslawsoltes.github.io/ChatGPT/).\n\n![image](https://user-images.githubusercontent.com/2297442/224843834-a58190df-3bdb-4722-b737-94e7adc87805.png)\n\n# Shortcuts\n\n### Main Window\n\n- Ctrl+Shift+A - Toggle between transparent and acrylic blur window style.\n- Ctrl+Shift+S - Toggle between visible and hidden window state.\n\n### Message Prompt\n\n- Enter - Send prompt.\n- Escape - Cancel edit.\n- F2 - Edit prompt.\n- Shift+Enter, Alt+Enter - Insert new line.\n\n# Overriding OpenAI api url\n\n```bash\nTo override the OpenAI api url set `OPENAI_API_URL_CHAT_COMPLETIONS` environment variable or set API url directly in app settings.\n```\n\n# OpenAI ChatGPT web version import\n\nYou can import [OpenAI ChatGPT web version](https://chat.openai.com/chat) chats backup created using [this script](https://github.com/abacaj/chatgpt-backup).\n\n# Build\n\n1. Install [.NET 7.0](https://dotnet.microsoft.com/en-us/download/dotnet/7.0)\n2. Run `dotnet workload install ios android wasm-tools` command\n3. `dotnet publish -c Release` command inside project directory (mobile/desktop) or `dotnet run` for desktop to just run\n\n### Dependencies\n\n- [Avalonia](https://github.com/AvaloniaUI/Avalonia)\n- [Markdown.Avalonia](https://github.com/whistyun/Markdown.Avalonia)\n- [Avalonia.HtmlRenderer](https://github.com/AvaloniaUI/Avalonia.HtmlRenderer)\n- [CommunityToolkit.Mvvm](https://github.com/CommunityToolkit/dotnet)\n\n# .NET tool\n\nInstall:\n```bash\ndotnet tool install --global ChatGPT.CLI --version 1.0.0-preview.17\n```\n\nUninstall:\n```bash\ndotnet tool uninstall --global ChatGPT.CLI\n```\n\n- [ChatGPT.CLI](https://www.nuget.org/packages/ChatGPT.CLI) - An .NET ChatGPT tool.\n\n### Usage\n\n```\nChatGPT.CLI:\nAn .NET ChatGPT tool.\n\nUsage:\nChatGPT.CLI [options]\n\nOptions:\n-f, --inputFiles \u003cinputfiles\u003e              The relative or absolute path to the input files\n-d, --inputDirectory \u003cinputdirectory\u003e      The relative or absolute path to the input directory\n-o, --outputDirectory \u003coutputdirectory\u003e    The relative or absolute path to the output directory\n--outputFiles \u003coutputfiles\u003e                The relative or absolute path to the output files\n-p, --pattern \u003cpattern\u003e                    The search string to match against the names of files in the input directory\n-r, --recursive                            Recurse into subdirectories of input directory search\n-e, --extension \u003cextension\u003e                The output file extension\n-s, --settingsFile \u003csettingsfile\u003e          The relative or absolute path to the settings file\n--temperature \u003ctemperature\u003e                What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic.\n--topP \u003ctopp\u003e                              An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n--presencePenalty \u003cpresencepenalty\u003e        Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.\n--frequencyPenalty \u003cfrequencypenalty\u003e      Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.\n--maxTokens \u003cmaxtokens\u003e                    The maximum number of tokens to generate in the chat completion.\n--apiKey \u003capikey\u003e                          Override OpenAI api key. By default OPENAI_API_KEY environment variable is used.\n--apiUrl \u003capiUrl\u003e                          Override OpenAI api url. By default OPENAI_API_URL_CHAT_COMPLETIONS environment variable is used.\n--model \u003cmodel\u003e                            ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API.\n--directions \u003cdirections\u003e                  The system message (directions) helps set the behavior of the assistant. Typically, a conversation is formatted with a system message first, followed by alternating user and assistant messages.\n-t, --threads \u003cthreads\u003e                    The number of parallel job threads\n--quiet                                    Set verbosity level to quiet\n--version                                  Show version information\n-?, -h, --help                             Show help and usage information\n```\n\n### Examples\n\n- Using .NET tool `chatgpt` command:\n\nC# to VB\n```bash\nchatgpt -d ./ -e vb -p *.cs --directions \"You are C# to VB conversion expert. Convert input code from C# to VB. Write only converted code.\"\n```\n\nC# to F#\n```bash\nchatgpt -d ./ -e fs -p *.cs --directions \"You are C# to F# conversion expert. Convert input code from C# to F#. Write only code.\"\n```\n\nRefactor C# code\n```bash\nchatgpt -d ./ -e cs -p *.cs --directions \"You are C# expert. Refactor C# code to use fluent api. Write only code.\"\n```\n\nWrite API documentation\n```bash\nchatgpt -d ./ -e md -p *.cs --directions \"You are a technical documentation writer. Write API documentation for C# code. If XML docs are missing write them.\"\n```\n\n- Run from source\n\nC# to VB\n```bash\ndotnet run -- -d ./ -e vb -p *.cs --directions \"You are C# to VB conversion expert. Convert input code from C# to VB. Write only converted code.\"\n```\n\nC# to F#\n```bash\ndotnet run -- -d ./ -e fs -p *.cs --directions \"You are C# to F# conversion expert. Convert input code from C# to F#. Write only code.\"\n```\n\nWrite API documentation\n```bash\ndotnet run -- -d ./ -e md -p *.cs --directions \"You are a technical documentation writer. Write API documentation for C# code. If XML docs are missing write them.\"\n```\n\n### Settings file format\n\n```json\n{\n    \"temperature\": 0.7,\n    \"top_p\": 1,\n    \"presence_penalty\": 0,\n    \"frequency_penalty\": 0,\n    \"maxTokens\": 2000,\n    \"apiKey\": \"\",\n    \"model\": \"gpt-3.5-turbo\",\n    \"directions\": \"You are a helpful assistant.\",\n    \"apiUrl\": \"\"\n}\n```\n\n# COM\n\nIn the build release directory `ChatGPT\\ChatGptCom\\bin\\Release\\net462\\` run following command to register `ChatGptCom.dll`.\n\n32-bit\n```\nc:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319\\regasmm.exe /codebase /tlb ChatGptCom.dll\n```\n\n64-bit\n```\nc:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319\\regasm.exe /codebase /tlb ChatGptCom.dll\n```\n\n### Microsoft Work 2010\n\nAdd `ChatGPT\\ChatGptCom\\bin\\Release\\net462\\ChatGptCom.tlb` to `References` using `Tools \u003e References...` menu in `Microsoft Visual Basic for Applications`.\n\n```vba\nOption Explicit\n\nPrivate WithEvents m_translateSource As Chat\nPrivate WithEvents m_demoSource As Chat\nDim OriginalSelection As Range\n\nSub TranslateSelection()\n    Set OriginalSelection = Selection.Range\n    Dim ProcessedText As String\n    ProcessedText = OriginalSelection.Text\n    m_translateSource.AskAsync \"You are a professional translator to English. I will provide text and you will translate it to English.\", ProcessedText\nEnd Sub\n\nSub Translate_Initialize()\n    Set m_translateSource = New ChatGptCom.Chat\nEnd Sub\n\nSub m_translateSource_OnSendCompleted()\n    OriginalSelection.Text = m_translateSource.Result\nEnd Sub\n\nSub Chat_Initialize()\n    Set m_demoSource = New ChatGptCom.Chat\nEnd Sub\n\nSub Chat_Send()\n    m_demoSource.AskAsync \"You are a professional translator to English.\", \"To jest rewolucja szutcznej inteligencji! VBA na zawsze!\"\nEnd Sub\n\nSub m_demoSource_OnSendCompleted()\n    MsgBox m_demoSource.Result\nEnd Sub\n\nSub ChatGpt()\n    Dim myObj As ChatGptCom.Chat\n    Set myObj = New ChatGptCom.Chat\n    myObj.AskAsync \"You are a professional translato to English.\", \"Cześć, witamy z Office VBA\"\nEnd Sub\n\nSub GetEnvironmentVariable()\n    Dim envVarName As String\n    Dim envVarValue As String\n    envVarName = \"OPENAI_API_KEY\"\n    envVarValue = Environ(envVarName)\n    MsgBox \"The value of the \" \u0026 envVarName \u0026 \" environment variable is:\" \u0026 vbCrLf \u0026 envVarValue\nEnd Sub\n```\n\nChat form:\n```vba\nOption Explicit\n\nPrivate WithEvents m_chatSource As Chat\n\nPrivate Sub UserForm_Initialize()\n    Set m_chatSource = New ChatGptCom.Chat\n    m_chatSource.Create \"You are a helpful assistant\", 2000, \"gpt-3.5-turbo\"\nEnd Sub\n\nPrivate Sub SendButton_Click()\n    Dim MessageText As String\n    MessageText = MessageTextBox.Text\n    MessagesListBox.AddItem MessageText\n    MessageTextBox.Text = \"\"\n    m_chatSource.MessageAsync MessageText, \"user\", True\nEnd Sub\n\nSub m_chatSource_OnSendCompleted()\n    Dim MessageText As String\n    MessageText = m_chatSource.Result\n    MessagesListBox.AddItem MessageText\nEnd Sub\n```\n\nChat form:\n```vba\nOption Explicit\n\nPrivate WithEvents m_chatSource As Chat\n\nPrivate Sub UserForm_Initialize()\n    Set m_chatSource = New ChatGptCom.Chat\n    m_chatSource.Create \"You are a helpful assistant\", 2000, \"gpt-3.5-turbo\"\nEnd Sub\n\nPrivate Sub SendButton_Click()\n    Dim MessageText As String\n    MessageText = MessageTextBox.Text\n    ChatTextBox.Text = ChatTextBox.Text \u0026 vbCrLf \u0026 MessageText\n    MessageTextBox.Text = \"\"\n    m_chatSource.MessageAsync MessageText, \"user\", True\nEnd Sub\n\nSub m_chatSource_OnSendCompleted()\n    Dim MessageText As String\n    MessageText = m_chatSource.Result\n    ChatTextBox.Text = ChatTextBox.Text \u0026 vbCrLf \u0026 MessageText\nEnd Sub\n```\n\n# NuGet\n\n- [ChatGPT](https://www.nuget.org/packages/ChatGPT) - An OpenAI api library for .NET.\n- [ChatGPT.Core](https://www.nuget.org/packages/ChatGPT.Core) - An OpenAI client core library for .NET.\n- [ChatGPT.UI](https://www.nuget.org/packages/ChatGPT.UI) - An OpenAI client user interface library for .NET.\n- [ChatGPT.CLI](https://www.nuget.org/packages/ChatGPT.CLI) - An .NET ChatGPT tool.\n- [ChatGptCom](https://www.nuget.org/packages/ChatGptCom) - An OpenAI api library for .NET COM interop.\n\n# Docs\n\n- [Guide Chat completions](https://platform.openai.com/docs/guides/chat)\n- [API Reference](https://platform.openai.com/docs/api-reference/chat)\n\n# License\n\nChatGPT is licensed under the [MIT license](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwieslawsoltes%2FChatGPT","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwieslawsoltes%2FChatGPT","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwieslawsoltes%2FChatGPT/lists"}