AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Sprachen und Entwicklungsumgebungen Sonstige Werkzeuge Programme bzw. Funktionen von KI schreiben lassen (OpenAI)
Thema durchsuchen
Ansicht
Themen-Optionen

Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

Ein Thema von Harry Stahl · begonnen am 14. Dez 2022 · letzter Beitrag vom 4. Okt 2023
Antwort Antwort
Benutzerbild von smallie
smallie

Registriert seit: 8. Jan 2013
19 Beiträge
 
Delphi 10.3 Rio
 
#1

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 15. Dez 2022, 14:03
Code:
function AddSinusWaves(freq: Real; offset: Real): Real;
begin
  Result := Sin(freq * 2 * Pi) + Sin(freq * (1 + offset) * 2 * Pi);
end;
Interessant. Allerdings entspricht die Anwort nicht 100% meiner Anfrage.
Die % Berechnung ist aus meiner Sicht falsch. Vermutlich aber weil die Frage nicht korrekt formuliert war. Denn 3% vom Vollkreis ist nicht 0.03.
Mit der Physik hat es die Engine noch nicht so recht. Die Engine möchte sin(Hz) = sin(1/s) berechnen.

Geht nicht. Oder vielleicht doch. Die Tests sind ja durchgelaufen ...
"There are two hard things in computer science: cache invalidation, naming things, and off-by-one errors."
  Mit Zitat antworten Zitat
Benutzerbild von PaPaNi
PaPaNi

Registriert seit: 31. Mär 2022
48 Beiträge
 
#2

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 15. Dez 2022, 15:19
Ich habe auch ganz kurz ausprobiert, paar Fragen über Delphi zu stellen (z.B. eine CSV-Datei lesen und in einer Liste abspeichern). AI hat angefanen was zu schreiben und es sah mehr oder weniger richtig aus. Aber die vollständige Antwort habe ich nie bekommen, weil ich immer wieder "Error in stream body" (oder was ähnliches) bekommen habe.

AI kann Anekdote/Gedichte schreiben, analysieren, beweisen und viel mehr. Also das ist nicht einfach eine neue Suchmaschine- Ich bin kein Expert in diesem Bereich, aber m.M.nach das ist schon ein großer Schrit in die Zukunft! Vielleicht erleben wir doch irgendwann, dass die Programme die anderen Programme schreiben können...

Paar Beispiele dazu:
1. AI sollte die Datei aus
https://github.com/kelbon/AnyAny/blo...iant_swarm.hpp
analysieren und nach Felher suchen. Sie hat zwar keine Fehler gefunden, aber empfohlen einige Kommentar zu ändern und hat auch begründet warum.
2. AI sollte erzählen, was in einem gegebenen Witz witziges gibt. Da war ein Wortspiel auf russisch drin. Und AI hat das erfolgreich verstanden und erklärt!

Die Beispiele sind aus
https://habr.com/ru/post/703380/
falls jemand Interesse hat und Russisch versteht. Oder Google-Translate verwenden, das wird aber schwierig, weil da relativ viel Screenshots gibt.
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.392 Beiträge
 
Delphi 12 Athens
 
#3

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 15. Dez 2022, 15:44
Für Handy gibt es (auch von Google) Apps, welche Live-Kamerabilder oder Screenshots und Fotos übersetzen,
also Text suchen und durch Übersetzung ersetzen.
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
Benutzerbild von Harry Stahl
Harry Stahl

Registriert seit: 2. Apr 2004
Ort: Bonn
2.561 Beiträge
 
Delphi 12 Athens
 
#4

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 15. Dez 2022, 17:42
Man sollte evtl. ergänzen, dass das aktuell nicht das fertige Produkt ist. Die gehen mit dem Teil in die Öffentlichkeit, um weitere Tests zu bekommen und das System in einem breiteren Kontext lernen zu lassen.

Später soll der Dienst wohl nicht mehr kostenlos sein oder Premium-Angebote haben.

Die sporadischen Fehlermeldungen ergeben sich, weil das System zeitweise wohl total überlastet ist, derzeit scheinen nicht wenige Leute das mal testen zu wollen.

Ich fand das einfach faszinierend, was da schon möglich ist. Klar ist das (noch) nicht perfekt, aber ich denke es offenbart schon ein wenig, wohin die Richtung geht...

Geändert von Harry Stahl (15. Dez 2022 um 17:46 Uhr)
  Mit Zitat antworten Zitat
Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
44.392 Beiträge
 
Delphi 12 Athens
 
#5

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 15. Dez 2022, 20:04
"schreib ein Programm, was Dieses und Jenes macht"

"erstelle ein Betriebssystem in Delphi"

geht nicht, weil

Zitat:
Whoa there! You might need to wait a bit.

Currently we are receiving more requests than we are are comfortable with! To try your request again, come back in a short while and reload this page.
Ein Therapeut entspricht 1024 Gigapeut.
  Mit Zitat antworten Zitat
Benutzerbild von Harry Stahl
Harry Stahl

Registriert seit: 2. Apr 2004
Ort: Bonn
2.561 Beiträge
 
Delphi 12 Athens
 
#6

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 15. Dez 2022, 22:42
Also ich fand, die Sache ist es wert, mal wieder ein kurzes Video zu machen.

Dort bin ich auch mal der Frage nachgegangen, ob man auch .dfm Dateien oder auch passende Projekt-Dateien direkt von der AI erstellen lassen kann.

Was dabei herausgekommen ist, könnt Ihr Euch hier ansehen: https://youtu.be/d9TZ6LUWqOs
  Mit Zitat antworten Zitat
API

Registriert seit: 18. Apr 2004
637 Beiträge
 
#7

AW: Programme bzw. Funktionen von KI schreiben lassen (OpenAI)

  Alt 16. Dez 2022, 09:26
Me: Create a Delphi console application that implements a chatbot

Chatbot: Sure! Here is an example of how you can create a simple chatbot in Delphi using the console application:

Delphi-Quellcode:
program Chatbot;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  input: string;

begin
  WriteLn('Hello, I am a chatbot. How can I help you today?');

  while True do
  begin
    Write('You: ');
    ReadLn(input);

    if input = 'exitthen
      Break;

    case input of
      'hi', 'hello':
        WriteLn('Chatbot: Hi there! How are you doing?');
      'how are you':
        WriteLn('Chatbot: I am just a computer program, so I don''t have feelings. But I am here to assist you.');
      'what can you do':
        WriteLn('Chatbot: I can answer questions, provide information, and carry out simple tasks. Is there anything specific you would like to know or do?');
      else
        WriteLn('Chatbot: I am sorry, I didn''t understand your question. Could you please rephrase it or ask for something else?');
    end;
  end;
end.
This chatbot will greet the user and then enter into a loop where it will continually read the user's input and respond with a predefined message. The chatbot can understand and respond to a few specific phrases, such as "hi", "hello", "how are you", and "what can you do". If the user enters any other phrase, the chatbot will respond with a default message.

To exit the chatbot, the user can type "exit".

I hope this helps! Let me know if you have any questions or need further assistance.

Me: Now let's add a functionality to the chatbot so it will be able to do some simple math operations.


Chatbot:

Sure! Here is an example of how you can modify the chatbot to perform simple math operations:

Delphi-Quellcode:
program Chatbot;

{$APPTYPE CONSOLE}

uses
  SysUtils, Math;

var
  input: string;
  num1, num2: Integer;
  result: Real;

begin
  WriteLn('Hello, I am a chatbot. How can I help you today?');

  while True do
  begin
    Write('You: ');
    ReadLn(input);

    if input = 'exitthen
      Break;

    case input of
      'hi', 'hello':
        WriteLn('Chatbot: Hi there! How are you doing?');
      'how are you':
        WriteLn('Chatbot: I am just a computer program, so I don''t have feelings. But I am here to assist you.');
      'what can you do':
        WriteLn('Chatbot: I can answer questions, provide information, and carry out simple tasks. Is there anything specific you would like to know or do?');
      'add', 'sum':
        begin
          Write('Enter the first number: ');
          ReadLn(num1);
          Write('Enter the second number: ');
          ReadLn(num2);
          result := num1 + num2;
          WriteLn('Chatbot: The sum of the two numbers is ', result);
        end;
      'subtract', 'difference':
        begin
          Write('Enter the first number: ');
          ReadLn(num1);
          Write('Enter the second number: ');
          ReadLn(num2);
          result := num1 - num2;
          WriteLn('Chatbot: The difference of the two numbers is ', result);
        end;
      'multiply', 'product':
        begin
          Write('Enter the first number: ');
          ReadLn(num1);
          Write('Enter the second number: ');
          ReadLn(num2);
          result := num1 * num2;
          WriteLn('Chatbot: The product of the two numbers is ', result);
        end;
      'divide', 'quotient':
        begin
          Write('Enter the first number: ');
          ReadLn(num1);
          Write('Enter the second number: ');
          ReadLn(num2);
          if num2 = 0 then
            WriteLn('Chatbot: Cannot divide by zero!')
          else
          begin
            result := num1 / num2;
            WriteLn('Chatbot: The quotient of the two numbers is ', result);
          end;
        end;
      else
        WriteLn('Chatbot: I am sorry, I didn''t understand your question. Could you please rephrase it or ask for something else?');
    end;
  end;
end
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 13:35 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz