GithubHelp home page GithubHelp logo

alidehbansiahkarbon / chatgptwizard Goto Github PK

View Code? Open in Web Editor NEW
229.0 26.0 54.0 1.19 MB

A ChatGPT, WriteSonic, YouChat, and Ollama(offline) plug-in for Embarcadero RAD Studio IDE 10.1 and later versions. https://getitnow.embarcadero.com/chatgptwizard

Home Page: https://alidehbansiahkarbon.github.io/ChatGPTWizard/

License: MIT License

Pascal 100.00%
chatgpt chatgpt-api delphi embarcadero expert openai openai-api plugin radstudio delphinuspackage

chatgptwizard's Issues

Chat Moderation

Hi. I have a question or comment regarding the use of the OpenAI API. In the code, the endpoint "https://api.openai.com/v1/chat/completions" is used. In this process, the prompts from the user are passed to the model unfiltered. Although this is unlikely to be the case often when programming, the user can send prompts to the model that violate OpenAI's rules. I could not find any moderation.

Is this assessment correct?

That would be problematic, as OpenAI is very strict about following the rules. They don't ask questions first, they just close the account. In a company with many people, this would not be so nice.

Access violation at address XXXXX in module 'ChatGptWizard.bpl'

Problem:

Unit: UChatGptMain.pas -> class procedure TEditNotifierHelper.FormatSource;

Solution:

class procedure TEditNotifierHelper.FormatSource;
var
LvEditorPopUpMenu: TPopupMenu;
LvFormatSource: TMenuItem;
begin
LvEditorPopUpMenu := TPopupMenu((BorlandIDEServices as IOTAEditorServices).TopView.GetEditWindow.Form.FindComponent('EditorLocalMenu'));
if LvEditorPopUpMenu <> nil then
begin
LvFormatSource := LvEditorPopUpMenu.Items.Find('Format Source');
if Assigned(LvFormatSource) then
LvFormatSource.Click;
end;
end;

2024-05-13 13_16_34-Fehler
2024-05-13 13_18_26-Setting
ErrorLog.txt

Invalid pointer operation

I installed delphi 10.3 and delphi 11.2, inserted the key and made a request and received a response 404 Not Found.
then I clicked load default values, inserted the key again and clicked save.
depending on the choice of model, the message changes, for example, if you choose gpt-3.5-turbo, the response will already be HTTP/1.1 404 Not Found

History Database Does Not Exist

Click on the History tab In the Dockable window - produces this error:
image

Note: I have History.sdb in ...\Embarcadero\Studio\22.0\CatalogRepository\ChatGPTWizard-2.0\Resources\DB

Delphi 11.3
Windows 11

Error Too Many Requests

Hi,
I'm receiving an error bellow when I try to ask for ChatGPT plugin on Delphi 11.3.
HTTP/1.1 429 Too Many Requests

I'm used the dll files onto /resources

Thanks

History

D10.2.3
History does not work
Search chate
then go to history. Nothing.
when searching writesonic search goes to chategpt
How do you get to search predefined questions?

Furthermore when copying each line adds a line feed which is not needed
Also, copying did it twice !!!! may chat send it twice?

.

Support for gpt-3.5-turbo

OpenAI has a newer, faster, cheaper (1/10 the cost of the "text-DaVinci-003" model) chat API model called "gpt-3.5-turbo".

Would it be possible to add this as a drop-down option in the Wizard?

No response to Questiom

Describe the bug
No answer given when click Ask when inside project
Nb. If no project, u get 'Could not load ssl library'... known issue

To Reproduce

Steps to reproduce the behavior:

  1. A project is open
  2. Add new unit & clear
  3. Click ChatGPT Menu to launch Dialog
    Default Q. Create a class to make a Zip file in Delphi.
    Click Ask=NO RESPONSE in Answer

Expected behavior

Response to Q. Create a class to make a Zip file in Delphi.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser - N/A]
  • Version [e.g. 22] : Delphi CE 10.4

After last update it stops working

HTTP/1.1 404 Not Foun is answer for the Asking.

To Reproduce
Steps to reproduce the behavior:

  1. Setup settings for gpt-3.5-turbo
    image

Go to the Dockable form, set the question and press Ask
image

Invalid Pointer Operation

After watching your demo videos, I couldn't wait to get ChatGPTWizard installed and working - it looks fantastic!
I installed it yesterday and asked my first test questions. Initially, I was getting the response "too many request".
But, today I am getting "Invalid pointer operation" (see below).

image

[3A236F67]{ChatGptWizard.bpl} Uchatgptlexer.TcpLexer.GetCurrentUnitPath + $47
[5BEEA5DF]{vcl280.bpl } Vcl.Styles.TCustomStyle.SourceLoaded (Line 3313, "Vcl.Styles.pas" + 1) + $F
[5BCC03CA]{vcl280.bpl } Vcl.Controls.TWinControl.CMInvalidate (Line 12737, "Vcl.Controls.pas" + 9) + $2
[3A236F5E]{ChatGptWizard.bpl} Uchatgptlexer.TcpLexer.GetCurrentUnitPath + $3E
[3A237E3F]{ChatGptWizard.bpl} Uchatgptlexer.TcpLexer.Reload + $1B
[3A23E8C4]{ChatGptWizard.bpl} Uchatgptqframe.TFram_Question.ReloadClassList + $B0
[3A23E640]{ChatGptWizard.bpl} Uchatgptqframe.TFram_Question.pgcMainChange + $20

Invalid pointer operation

Describe the bug
"Invalid pointer operation" is written in the editor. No response in the Answer box in the ChatGPT dialog window.

To Reproduce

  1. write "cpt:Create a full unit in Delphi including a class to create an XML file.:cpt" in the editor window
  2. Press CTRL+ALT+SHIFT+A
  3. "Invalid pointer operation" is written in the editor.

In the ChatGPT dialog, there is no response in the Answer box when asking a question.

Expected behavior

Screenshots

Desktop (please complete the following information):

  • Windows 11 Pro Version 22H2
  • Chrome Version 111.0.5563.147
  • Delphi 11.2 Version 28.0.46141.0937

Smartphone (please complete the following information):

Additional context

Change theme doesn't effect the dockable form.

Describe the bug
Change theme doesn't effect the dockable form and you have to close and open this form to get the new style.

To Reproduce
Just open dockable form, docked or not docked doesn't matter, then try to change the style of the IDE.

Expected behavior
Real time color change same as other IDE components.

Screenshots
image
image

  • OS: windows 11
  • IDE Alexandria 11.1

Canno't install on D10.0

Describe the bug
during compiling dpk got:
[dcc32 Fatal Error] XSuperJSON.pas(1): F2084 Internal Error: AV0D798E88-R00000014-0

Screenshots
obraz

Remove dependency on Indy

In order to reduce the dependencies on 3rd party libraries for this project and on OpenSSL DLLs it would be nice if the REST requests needed could be done using either System.Net.HttpClientComponent.TNetHTTPClient or System.Net.HttpClient.THTTPClient.

These wouldn't need OpenSSL DLLs for TLS as they'd use the Windows APIs and thus Windows built in TLS support.

typo in predefined question

open ChatGPT menu
open Settings
choose PreDefined Questions tab
the caption for question "Create necessary interfaces for this class in Delphi:" says "Crreate Interface"

needs to say "Create Interface" instead (has double "r")

Add support for local large language models, (Ollama)

I have a network computer running linux, that I've set up an https://ollama.ai service on.

The steps to start the ollama service are:

installing & running ollama which is a llm server
installing litellm which is an openai emulator
running it.

litellm -m ollama/mistral --port 9000 --drop_params&

Which means I now have an openai compatible port at 192.168.0.15:9000

Unfortunately when I tried using the ChatGPT wizard, it came back with an error "No answer, try again"
On the linux side the message said:
Docs: https://docs.litellm.ai/docs/proxy_server

Worker Initialized

INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:9000 (Press CTRL+C to quit)
192.168.0.196:50629 - "POST / HTTP/1.1" 405 Method Not Allowed

google show others with this problem.
openai/chatgpt-retrieval-plugin#74

IsEmpty No answer, try again

When clicking the ASK button, I always get this answer: IsEmpty No answer, try again
Of course, the correct API key has been entered.
There is no verification feedback on the API key.

ChatGptWizard through delphi application! Is it possible?

Hello Ali
I downloaded and installed your ChatGptWizard in my delphi 13.3 environment. Every thing is fine and I could make my chat very well.
However I have been I struggling very hard to implement this functionality within my delphi application. That will be very nice to combine the power of the ai engine and my application, My students are looking forward for that.
All I need is to be able to execute a function such as the following:
GtpAnswer:=GetGptAnswer(MyQuestion)

I am suscibed to ChatGtp 4.
Please I woukd highly appreciate your assistance with this issue.
Bishara Wakim

Could not load SSL library

When running ChatGPT on RadStudio 11.3 installed by GetManager within Delphi 11.3 i'm getting this response 'Could not load SSL library' when clicking on the Ask button.

What ssl libarary needs to be installed?

ChatGPT API key are set in steeings.

The Behavior:
Open ChatGPT on the Menu bar of Delphi
Select Ask ChatGPT
Write a question or just use the template 'Create a class to make a Zip file in Delphi.'
Click 'Ask'
Response : 'Could not load SSL library'

2023-03-30_18-56-42

2023-03-30_18-57-42

2023-03-30_18-58-30

No history

I had to open new

Now history is bad again and stopped working
Although i am on chatGPT I get this msg

***** WriteSonic *****
Server Certificate Invalid or not present
so I closed writesonic it did not help.
I closed Delphi it was OK BUT
ONLY FOR ONE MSG !!!.
I deleted the history lines run chat NOTHIN NO HISTORY

مشکل فعالسازی در کشور ایران

با سلام
ظاهرا شرکت OpenAI به کشور ایران (خط موبایل ایران )خدمات و کد فعالسازی نمی دهد ؟
برای این موضوع راهکاری دارید؟
با تشکر

D10.0 compatibility

D10.0 don't support flowing property:

  LvHttpClient := THTTPClient.Create;
  LvHttpClient.**ConnectionTimeout** := FTimeOut * 1000;
  LvHttpClient.**ResponseTimeout** := (FTimeOut * 1000) * 2;

Errors:

[dcc32 Error] UYouChatThread.pas(160): E2003 Undeclared identifier: 'ConnectionTimeout'
[dcc32 Error] UYouChatThread.pas(161): E2003 Undeclared identifier: 'ResponseTimeout'
[dcc32 Fatal Error] ChatGptWizard.dpk(59): F2063 Could not compile used unit 'UYouChatThread.pas'

Can ChatGptWizard be used by a delphi application?

Hello Ali
I downloaded and installed your ChatGptWizard in my delphi 11.3 environment. Every thing is fine and I could make my chat very well.
However I have been struggling very hard to implement this functionality within my delphi application. That will be very nice to combine the power of the ai engine and my application, My students are looking forward for that.
All I need is to be able to execute a function such as the following:
GtpAnswer:=GetGptAnswer(MyQuestion)

I am suscibed to ChatGtp 4.
Please I woukd highly appreciate your assistance with this issue.
Bishara Wakim

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.