{"id":13455825,"url":"https://github.com/rueetschli/OpenAI-GPT-3.5-turbo-simple-script","last_synced_at":"2025-03-24T09:30:45.390Z","repository":{"id":168700804,"uuid":"609029529","full_name":"rueetschli/OpenAI-GPT-3.5-turbo-simple-script","owner":"rueetschli","description":"Hier findest du das wohl einfachste und benutzerfreundlichste Chat-Script für die OpenAI-API GPT 3.5-tubro und GPT 4. Das Script benötigt kein Framework und du kannst es ohne Vorkenntnisse verwenden.   // EN:  Here you will find probably the simplest and most user-friendly chat script for the OpenAI API GPT 3.5-tubro and GPT 4. ","archived":false,"fork":false,"pushed_at":"2023-03-29T06:41:44.000Z","size":244,"stargazers_count":28,"open_issues_count":0,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-08-01T08:17:10.940Z","etag":null,"topics":["ai","api","chatbot","chatgpt","css","davinci-003","gpt-35-turbo","gpt-4","hosting","javascript","openai","openai-api","php","simple"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/rueetschli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2023-03-03T08:22:04.000Z","updated_at":"2023-11-25T07:04:08.000Z","dependencies_parsed_at":"2024-01-13T17:47:42.249Z","dependency_job_id":"f4d8714f-7e1e-4a70-b241-523eb6e1139c","html_url":"https://github.com/rueetschli/OpenAI-GPT-3.5-turbo-simple-script","commit_stats":null,"previous_names":["rueetschli/openai-gpt-3.5-turbo-simple-script"],"tags_count":3,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rueetschli%2FOpenAI-GPT-3.5-turbo-simple-script","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rueetschli%2FOpenAI-GPT-3.5-turbo-simple-script/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rueetschli%2FOpenAI-GPT-3.5-turbo-simple-script/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rueetschli%2FOpenAI-GPT-3.5-turbo-simple-script/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rueetschli","download_url":"https://codeload.github.com/rueetschli/OpenAI-GPT-3.5-turbo-simple-script/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221955976,"owners_count":16907476,"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","chatbot","chatgpt","css","davinci-003","gpt-35-turbo","gpt-4","hosting","javascript","openai","openai-api","php","simple"],"created_at":"2024-07-31T08:01:11.751Z","updated_at":"2024-10-28T23:30:41.314Z","avatar_url":"https://github.com/rueetschli.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"#Script für gpt-3.5-turbo Modell (GPT 4 ready) [English version below]\n------------\n\nPHP | CSS | html | Javascript\nEin Chat, aufbauend auf der API für chatgpt von chat.openai.com\n\nOpenAI-GPT-3.5-turbo-simple-script ist vermutlich die einfachste Art einen Chat für OpenAI GPT 3.5-turbo und GPT 4 selber zu installieren und zu hosten.\nDas Script besteht lediglich aus 4 Dateien (index.php, setsesion.php, stream.php und chat.js). Die restlichen Dateien sind Hilfsdateien zur Darstellung (.css) und für die erweiterten Funktionalitäten (.js)\n\nDie php-Version ruft die neueste OpenAI-Schnittstelle und das Modell gpt-3.5-turbo für die Q\u0026A-Demo auf, wobei die Kommunikation im Stream-Modus erfolgt und die Antwortgeschwindigkeit die der offiziellen Website übertrifft. Das Front-End verwendet JS's EventSource, unterstützt Markdown-Format Parsing, und der Code hat Farbgebung Verarbeitung. Die Benutzeroberfläche der Seite ist einfach und unterstützt kontextbezogene kontinuierliche Sitzungen. \n\n*Es wird kein Framework verwendet und alle PHP-Versionen werden unterstützt.*\n\nDas Script kann mit einem eigenen API-Schlüssel betrieben werden (Ändern Sie einfach den API_KEY in der Datei stream.php), oder sie lassen die Endbenutzer einen API-Schlüssel eintragen (Kommentieren Sie dazu die nötigen Zeilen in der Datei index.php aus)\n\n\n#Credits \n------------\nUrsprünglicher Fork: https://github.com/dirk1983/chatgpt\nDas orginal-Script wurde lokalisiert, überprüft und angepasst.\n\n\n#Installation\n------------\nInstalliere alle Dateien auf einem (geschützten) Webverzeichnis.\nRegistriere dich auf https://platform.openai.com/ für einen API-Key.\n\nFüge diesen Key in der Datei stream.php in der Zeile 9 ein. Ersetze dabei \"Deine-OpenAI-API\" und lasse die \"\" stehen.\n\nFalls du die Chats protokollieren möchtest, stelle sicher, dass die Datei chat.txt über schreibrechte (644) verfügt. \n\nOptional kannst du in der Datei index.php die Zeilen 3-23 Entkommentieren. Damit wäre die Seite sehr rudimentär Geschützt. \nSetze dazu deine IP-Adresse in der Zeile 3 ein. Wähle ein Benutzername und ein Passwort. Ersetze in Zeile 14 bei (($_SERVER['PHP_AUTH_USER']==\"admin\") das Wort admin mit deinem gewählten Benutzername und bei ($_SERVER['PHP_AUTH_PW']==\"admin\") das Passwort.\n\n\n#Change-Log\n------------\n23. März 2023\n* AI anfrage kann jederzeit unterbrochen werden\n* Einige voreingestellte Phrasen hinzugefügt\n* Die Anpassung an mobile Browser wurde optimiert\n* Schaltfläche zum Kopieren von Codes hinzugefügt\n* Fragen können nun Mehrzeilig verfasst werden. \n\n\n02. März 2023\n* Codezeilen werden nun als Blöcke dargestellt\n* Beutzer kann eigenen API-Key verwenden\n* Bugfixing\n\n\n27. Februar 2023\n* Initialversion.\n\n\n![image](https://user-images.githubusercontent.com/8299018/226865912-0f0db9e2-d604-4487-9c62-912130d71433.png)\n\n\n\n\n#Script for gpt-3.5-turbo model (GPT 4 ready)\n------------\nPHP | CSS | html | Javascript A chat, based on the API for chatgpt from chat.openai.com\n\nOpenAI-GPT-3.5-turbo-simple-script is probably the easiest way to install and host a chat for OpenAI GPT 3.5-turbo and GPT 4 by yourself. The script consists of only 4 files (index.php, setsesion.php, stream.php and chat.js), the rest are auxiliary files for display (.css) and advanced functionality (.js).\n\nThe php version calls the latest OpenAI interface and the gpt-3.5-turbo model for the Q\u0026A demo, communicating in stream mode and with response speed exceeding that of the official website. The front-end uses JS's EventSource, supports Markdown-format parsing, and the code has coloring processing. The site's user interface is simple and supports contextual continuous sessions.\n\nNo framework is used and all PHP versions are supported.\n\nThe script can be run with its own API key (just change the API_KEY in the stream.php file), or let the end-users enter an API key (comment out the necessary lines in the index.php file)\n\n#Credits\n------------\nOriginal fork: https://github.com/dirk1983/chatgpt The orginal script has been localized, checked and adjusted.\n\n#Installation\n------------\nInstall all files on a (protected) web directory. Register at https://platform.openai.com/ for an API key.\n\nAdd this key in the stream.php file in line 9. Replace \"Your-OpenAI-API\" and leave the \"\".\n\nIf you want to log the chats, make sure that the file chat.txt has write permissions (644).\n\nOptionally, you can uncomment lines 3-23 in the index.php file. This would protect the page in a very rudimentary way. Put your IP address in line 3. Choose a username and a password. Replace in line 14 at (($_SERVER['PHP_AUTH_USER']==\"admin\") the word admin with your chosen username and at ($_SERVER['PHP_AUTH_PW']==\"admin\") the password.\n\n#change-log\n------------\nMarch 2023\n* AI request can be interrupted at any time\n* Added some preset phrases\n* Optimized adaptation to mobile browsers\n* Added button to copy codes\n* Questions can now be written in multiple lines.\n\nMarch 2023\n* Lines of code are now displayed as blocks\n* User can use own API key\n* Bugfixing\n\nFebruary 2023\n* Initial version.\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frueetschli%2FOpenAI-GPT-3.5-turbo-simple-script","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frueetschli%2FOpenAI-GPT-3.5-turbo-simple-script","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frueetschli%2FOpenAI-GPT-3.5-turbo-simple-script/lists"}