Coder Social home page Coder Social logo

wieslawsoltes / chatgpt Goto Github PK

View Code? Open in Web Editor NEW
1.4K 29.0 207.0 243.55 MB

A ChatGPT C# client for MacOS, Windows, Linux, Android, iOS and Browser. Powered by Avalonia UI framework.

Home Page: https://wieslawsoltes.github.io/ChatGPT/

License: MIT License

C# 95.58% CSS 0.43% HTML 0.62% JavaScript 0.43% Batchfile 0.11% PowerShell 1.59% Shell 1.23%
api chatgpt openai ai avalonia avaloniaui clippy

chatgpt's Introduction

ChatGPT

Build Status CI

GitHub release Github All Releases Github Releases

NuGet NuGet

A ChatGPT C# client for graphical user interface runs on MacOS, Windows, Linux, Android, iOS and Browser. Powered by Avalonia UI framework.

To make the app work, you need to set the OpenAI API key as the OPENAI_API_KEY environment variable or set API key directly in app settings.

You can try client using browser version here.

image

Shortcuts

Main Window

  • Ctrl+Shift+A - Toggle between transparent and acrylic blur window style.
  • Ctrl+Shift+S - Toggle between visible and hidden window state.

Message Prompt

  • Enter - Send prompt.
  • Escape - Cancel edit.
  • F2 - Edit prompt.
  • Shift+Enter, Alt+Enter - Insert new line.

Overriding OpenAI api url

To override the OpenAI api url set `OPENAI_API_URL_CHAT_COMPLETIONS` environment variable or set API url directly in app settings.

OpenAI ChatGPT web version import

You can import OpenAI ChatGPT web version chats backup created using this script.

Build

  1. Install .NET 7.0
  2. Run dotnet workload install ios android wasm-tools command
  3. dotnet publish -c Release command inside project directory (mobile/desktop) or dotnet run for desktop to just run

Dependencies

.NET tool

Install:

dotnet tool install --global ChatGPT.CLI --version 1.0.0-preview.17

Uninstall:

dotnet tool uninstall --global ChatGPT.CLI

Usage

ChatGPT.CLI:
An .NET ChatGPT tool.

Usage:
ChatGPT.CLI [options]

Options:
-f, --inputFiles <inputfiles>              The relative or absolute path to the input files
-d, --inputDirectory <inputdirectory>      The relative or absolute path to the input directory
-o, --outputDirectory <outputdirectory>    The relative or absolute path to the output directory
--outputFiles <outputfiles>                The relative or absolute path to the output files
-p, --pattern <pattern>                    The search string to match against the names of files in the input directory
-r, --recursive                            Recurse into subdirectories of input directory search
-e, --extension <extension>                The output file extension
-s, --settingsFile <settingsfile>          The relative or absolute path to the settings file
--temperature <temperature>                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.
--topP <topp>                              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.
--presencePenalty <presencepenalty>        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.
--frequencyPenalty <frequencypenalty>      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.
--maxTokens <maxtokens>                    The maximum number of tokens to generate in the chat completion.
--apiKey <apikey>                          Override OpenAI api key. By default OPENAI_API_KEY environment variable is used.
--apiUrl <apiUrl>                          Override OpenAI api url. By default OPENAI_API_URL_CHAT_COMPLETIONS environment variable is used.
--model <model>                            ID of the model to use. See the model endpoint compatibility table for details on which models work with the Chat API.
--directions <directions>                  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.
-t, --threads <threads>                    The number of parallel job threads
--quiet                                    Set verbosity level to quiet
--version                                  Show version information
-?, -h, --help                             Show help and usage information

Examples

  • Using .NET tool chatgpt command:

C# to VB

chatgpt -d ./ -e vb -p *.cs --directions "You are C# to VB conversion expert. Convert input code from C# to VB. Write only converted code."

C# to F#

chatgpt -d ./ -e fs -p *.cs --directions "You are C# to F# conversion expert. Convert input code from C# to F#. Write only code."

Refactor C# code

chatgpt -d ./ -e cs -p *.cs --directions "You are C# expert. Refactor C# code to use fluent api. Write only code."

Write API documentation

chatgpt -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."
  • Run from source

C# to VB

dotnet 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."

C# to F#

dotnet run -- -d ./ -e fs -p *.cs --directions "You are C# to F# conversion expert. Convert input code from C# to F#. Write only code."

Write API documentation

dotnet 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."

Settings file format

{
    "temperature": 0.7,
    "top_p": 1,
    "presence_penalty": 0,
    "frequency_penalty": 0,
    "maxTokens": 2000,
    "apiKey": "",
    "model": "gpt-3.5-turbo",
    "directions": "You are a helpful assistant.",
    "apiUrl": ""
}

COM

In the build release directory ChatGPT\ChatGptCom\bin\Release\net462\ run following command to register ChatGptCom.dll.

32-bit

c:\Windows\Microsoft.NET\Framework\v4.0.30319\regasmm.exe /codebase /tlb ChatGptCom.dll

64-bit

c:\Windows\Microsoft.NET\Framework64\v4.0.30319\regasm.exe /codebase /tlb ChatGptCom.dll

Microsoft Work 2010

Add ChatGPT\ChatGptCom\bin\Release\net462\ChatGptCom.tlb to References using Tools > References... menu in Microsoft Visual Basic for Applications.

Option Explicit

Private WithEvents m_translateSource As Chat
Private WithEvents m_demoSource As Chat
Dim OriginalSelection As Range

Sub TranslateSelection()
    Set OriginalSelection = Selection.Range
    Dim ProcessedText As String
    ProcessedText = OriginalSelection.Text
    m_translateSource.AskAsync "You are a professional translator to English. I will provide text and you will translate it to English.", ProcessedText
End Sub

Sub Translate_Initialize()
    Set m_translateSource = New ChatGptCom.Chat
End Sub

Sub m_translateSource_OnSendCompleted()
    OriginalSelection.Text = m_translateSource.Result
End Sub

Sub Chat_Initialize()
    Set m_demoSource = New ChatGptCom.Chat
End Sub

Sub Chat_Send()
    m_demoSource.AskAsync "You are a professional translator to English.", "To jest rewolucja szutcznej inteligencji! VBA na zawsze!"
End Sub

Sub m_demoSource_OnSendCompleted()
    MsgBox m_demoSource.Result
End Sub

Sub ChatGpt()
    Dim myObj As ChatGptCom.Chat
    Set myObj = New ChatGptCom.Chat
    myObj.AskAsync "You are a professional translato to English.", "Cześć, witamy z Office VBA"
End Sub

Sub GetEnvironmentVariable()
    Dim envVarName As String
    Dim envVarValue As String
    envVarName = "OPENAI_API_KEY"
    envVarValue = Environ(envVarName)
    MsgBox "The value of the " & envVarName & " environment variable is:" & vbCrLf & envVarValue
End Sub

Chat form:

Option Explicit

Private WithEvents m_chatSource As Chat

Private Sub UserForm_Initialize()
    Set m_chatSource = New ChatGptCom.Chat
    m_chatSource.Create "You are a helpful assistant", 2000, "gpt-3.5-turbo"
End Sub

Private Sub SendButton_Click()
    Dim MessageText As String
    MessageText = MessageTextBox.Text
    MessagesListBox.AddItem MessageText
    MessageTextBox.Text = ""
    m_chatSource.MessageAsync MessageText, "user", True
End Sub

Sub m_chatSource_OnSendCompleted()
    Dim MessageText As String
    MessageText = m_chatSource.Result
    MessagesListBox.AddItem MessageText
End Sub

Chat form:

Option Explicit

Private WithEvents m_chatSource As Chat

Private Sub UserForm_Initialize()
    Set m_chatSource = New ChatGptCom.Chat
    m_chatSource.Create "You are a helpful assistant", 2000, "gpt-3.5-turbo"
End Sub

Private Sub SendButton_Click()
    Dim MessageText As String
    MessageText = MessageTextBox.Text
    ChatTextBox.Text = ChatTextBox.Text & vbCrLf & MessageText
    MessageTextBox.Text = ""
    m_chatSource.MessageAsync MessageText, "user", True
End Sub

Sub m_chatSource_OnSendCompleted()
    Dim MessageText As String
    MessageText = m_chatSource.Result
    ChatTextBox.Text = ChatTextBox.Text & vbCrLf & MessageText
End Sub

NuGet

  • ChatGPT - An OpenAI api library for .NET.
  • ChatGPT.Core - An OpenAI client core library for .NET.
  • ChatGPT.UI - An OpenAI client user interface library for .NET.
  • ChatGPT.CLI - An .NET ChatGPT tool.
  • ChatGptCom - An OpenAI api library for .NET COM interop.

Docs

License

ChatGPT is licensed under the MIT license.

chatgpt's People

Contributors

gabrieldelaparra avatar wieslawsoltes avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgpt's Issues

Search prompts

When there are a lot of prompts/directions stored, it can be difficult to find the one you're looking for.

A search engine would be helpful.

Search across the "Act" and "Prompt" fields.

Chat text is invisible until I click edit.

I'm running on Windows 11. All chat text is invisible. It will only display after clicking the edit button for each entry. After exiting editing, the text disappears.

image

Add Top-P, Frequency Penalty and Presence Penalty

As a feature request could you please integrate the parameters top_p, frequency_penalty, and presence_penalty into the application? It would be greatly appreciated and significantly enhance its functionality and customizability.

Create macOS App Bundle to allow Adding to Applications/Dock

Example:

ChatGpt.app -> Contents
Info.plist
MacOS -> All the files from release (ChatGPT.UI.Desktop, *.dylib, System.Native.a )
Resources -> Clippy.icns

Example Info.plist

CFBundleDevelopmentRegion English CFBundleExecutable ChatGPT.UI.Desktop CFBundleIconFile Clippy.icns CFBundleIdentifier com.yourcompany.ChatGPT CFBundleName ChatGPT CFBundlePackageType APPL CFBundleShortVersionString 1.0 CFBundleVersion 1
<!-- Application Category (Optional) -->
<!-- Uncomment and modify this key if needed -->
<!--
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
-->

<!-- Dependencies (Assuming they are in the same folder as the executable) -->
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>true</string>
<key>CFBundleDocumentTypes</key>
<array>
    <!-- Add document types here if applicable -->
</array>
<key>CFBundlePackageType</key>
<string>APPL</string>

<!-- Dependencies (Assuming they are in the same folder as the executable) -->
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

<!-- Dependencies (Assuming they are in the same folder as the executable) -->
<key>CFBundleExecutable</key>
<string>ChatGPT.UI.Desktop</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>ChatGPT</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>

<!-- Dependencies (Assuming they are in the same folder as the executable) -->
<key>CFBundleExecutable</key>
<string>ChatGPT.UI.Desktop</string>
<key>CFBundlePackageType</key>
<string>APPL</string>

<!-- Dependencies (Assuming they are in the same folder as the executable) -->
<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

<!-- Dependencies (Assuming they are in the same folder as the executable) -->
<key>CFBundleExecutable</key>
<string>ChatGPT.UI.Desktop</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>ChatGPT</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>

Clippy.icns.zip

API Error feedback

API returned "Quota exceeded" error message. Would be nice to show these in red as the response message.

Name collision with /usr/bin/chat

I renamed /usr/bin/chat to /usr/bin/chatold for now but I would like to suggest to give the project a cool name to distinguish it from all the other "chat*" available.

Not showing errors

I have an API key but 0 tokens left - and I just don't get any response. It should probably say something 😊

Changing to mobile view crashes on Arch Linux Xfce Desktop.

 ╰─λ dotnet run
System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at System.Collections.ObjectModel.Collection`1.System.Collections.IList.get_Item(Int32 index)
   at Avalonia.Controls.VirtualizingStackPanel.GetItemIsOwnContainer(IReadOnlyList`1 items, Int32 index) in /_/src/Avalonia.Controls/VirtualizingStackPanel.cs:line 525
   at Avalonia.Controls.VirtualizingStackPanel.GetOrCreateElement(IReadOnlyList`1 items, Int32 index) in /_/src/Avalonia.Controls/VirtualizingStackPanel.cs:line 513
   at Avalonia.Controls.VirtualizingStackPanel.GenerateElements(Size availableSize, MeasureViewport& viewport) in /_/src/Avalonia.Controls/VirtualizingStackPanel.cs:line 492
   at Avalonia.Controls.VirtualizingStackPanel.MeasureOverride(Size availableSize) in /_/src/Avalonia.Controls/VirtualizingStackPanel.cs:line 166
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Controls.Presenters.ScrollContentPresenter.MeasureOverride(Size availableSize) in /_/src/Avalonia.Controls/Presenters/ScrollContentPresenter.cs:line 343
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in /_/src/Avalonia.Controls/Grid.cs:line 1098
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in /_/src/Avalonia.Controls/Grid.cs:line 1053
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint) in /_/src/Avalonia.Controls/Grid.cs:line 501
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness) in /_/src/Avalonia.Base/Layout/LayoutHelper.cs:line 51
   at Avalonia.Controls.Border.MeasureOverride(Size availableSize) in /_/src/Avalonia.Controls/Border.cs:line 241
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Controls.DockPanel.MeasureOverride(Size constraint) in /_/src/Avalonia.Controls/DockPanel.cs:line 91
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness) in /_/src/Avalonia.Base/Layout/LayoutHelper.cs:line 51
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize) in /_/src/Avalonia.Controls/Presenters/ContentPresenter.cs:line 591
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness) in /_/src/Avalonia.Base/Layout/LayoutHelper.cs:line 51
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize) in /_/src/Avalonia.Controls/Presenters/ContentPresenter.cs:line 591
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in /_/src/Avalonia.Controls/Grid.cs:line 1098
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in /_/src/Avalonia.Controls/Grid.cs:line 1053
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint) in /_/src/Avalonia.Controls/Grid.cs:line 501
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV) in /_/src/Avalonia.Controls/Grid.cs:line 1098
   at Avalonia.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV, Boolean& hasDesiredSizeUChanged) in /_/src/Avalonia.Controls/Grid.cs:line 1053
   at Avalonia.Controls.Grid.MeasureOverride(Size constraint) in /_/src/Avalonia.Controls/Grid.cs:line 501
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.LayoutHelper.MeasureChild(Layoutable control, Size availableSize, Thickness padding, Thickness borderThickness) in /_/src/Avalonia.Base/Layout/LayoutHelper.cs:line 51
   at Avalonia.Controls.Presenters.ContentPresenter.MeasureOverride(Size availableSize) in /_/src/Avalonia.Controls/Presenters/ContentPresenter.cs:line 591
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.Layoutable.MeasureOverride(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 605
   at Avalonia.Layout.Layoutable.MeasureCore(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 576
   at Avalonia.Layout.Layoutable.Measure(Size availableSize) in /_/src/Avalonia.Base/Layout/Layoutable.cs:line 386
   at Avalonia.Layout.LayoutManager.Measure(Layoutable control) in /_/src/Avalonia.Base/Layout/LayoutManager.cs:line 297
   at Avalonia.Layout.LayoutManager.ExecuteMeasurePass() in /_/src/Avalonia.Base/Layout/LayoutManager.cs:line 254
   at Avalonia.Layout.LayoutManager.InnerLayoutPass() in /_/src/Avalonia.Base/Layout/LayoutManager.cs:line 236
   at Avalonia.Layout.LayoutManager.ExecuteLayoutPass() in /_/src/Avalonia.Base/Layout/LayoutManager.cs:line 148
   at Avalonia.Layout.LayoutManager.ExecuteQueuedLayoutPass() in /_/src/Avalonia.Base/Layout/LayoutManager.cs:line 108
   at Avalonia.Threading.JobRunner.RunJobs(Nullable`1 priority) in /_/src/Avalonia.Base/Threading/JobRunner.cs:line 38
   at Avalonia.X11.X11PlatformThreading.HandleX11(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 199
   at Avalonia.X11.X11PlatformThreading.RunLoop(CancellationToken cancellationToken) in /_/src/Avalonia.X11/X11PlatformThreading.cs:line 245
   at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken) in /_/src/Avalonia.Base/Threading/Dispatcher.cs:line 61
   at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 122
   at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, ShutdownMode shutdownMode) in /_/src/Avalonia.Controls/ApplicationLifetimes/ClassicDesktopStyleApplicationLifetime.cs:line 214
   at ChatGPT.Program.Main(String[] args) in /home/cocoonkid/Documents/tmp/ChatGPT/src/ChatGPT.UI.Desktop/Program.cs:line 14

Android - Delete char in textbox

The (Ask me anything) textbox in Android does not work well when trying to delete the last character (e.g. it unexpectedly deletes the fourth char instead of the last one and eventually, after another click on del, all text is suddenly deleted). This, together with not having auto spelling check and the native keyboard, makes writing extremely awkward.

Max tokens cannot be changed to 8000.

Max tokens cannot be changed to 8000.

Everytime I do this it truncates to 800. The maximum with arrow is 4000.

I can do more tokens now with a beta invite. So that would be really cool!

Thanks!

Voice input and output

enhancement

i can talk to Bard really well with a good cardioid mic , endless long prompts, 99% almost. even about whatever.
But i would like to command query and complete against a certain Domain specific language in context .

Microsoft is doing a Windows Copilot but i have my doubts.. I'll just leave this idea here in case they don't do it , its been suggested by people they should do this..

this might be out of scope but its seems this can act as a plugin to a tool ur control apps supporting Automation/ plugins, and for OS, you can look in the folders, scrape apis with Silk or however the do it..

The best one is https://github.com/omlins/JustSayIt.jl because its low latency.. you should be able to use any UI hands free.
https://github.com/omlins/JustSayItRecipes.jl/blob/main/recipes/ubuntu_max.jl i think you can run that from c# but deploying it .. i donno, might be difficult.

I don't know how Whisper is but its doesnt seems Realtime or fast enough from the docs.
If you can limit the domain say vs an API or App or Language automation or object model, or act as a tool plugin it can better do completion and voice recognitions as its doing that together. but context should be able provided by something other than prior words, allowing to scrape user commands, apis, and apply synonyms and user defined as a last resort.

Simplex voice and no look operation like Query . ..command, and interrupt , repeat, copy that. do you copy? "Over, or Send ", means send it. visual studio has that nice code feature search, it could start with that...

there are a lot of plugins for tools but using Automation / com /c# or reflection, can help allot in accuracy.
Microsoft Voice Access leaves a lot to be desired and if done properly it could be voice and hands free for at least debugging and operating UI and menus and command could be if coding its too much.. But they are taking the approach of running the mouse and its pretty bad.

a Mic could the start menu for any OS and any App. using the context given by a hotword... "Windows" <-hot, Launch Visual Stu "Alpha" <-- choice tagged on auto-completion
Voice Access is using 1, 2, 3.. etc.. but its too easy to confuse with Class1, etc..

choose among sets of hotwords:
define custom hot words , visual markers Tokens like Alpha , Bravo , Charlie, for choices, and say" Over" for "Send", or use Radio Coms protocols

this is on the wishlist of the gpt4all

  • Plugin support for langchain other developer tools
  • Text to speech - have the AI response with voice
  • Speech to text - give the prompt with your voice

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.