Kommunikation mit Assistant auf Threads umgestellt
This commit is contained in:
29
index.php
Normal file
29
index.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
// Include the configuration file
|
||||
require_once 'config.php';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>ChatGPT Assistent</title>
|
||||
<link rel="stylesheet" href="styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="chat-container">
|
||||
<h1>ChatGPT Assistent</h1>
|
||||
<div id="chat-messages"></div>
|
||||
<form id="chat-form">
|
||||
<input type="text" id="user-input" placeholder="Geben Sie Ihre Nachricht ein..." required>
|
||||
<button type="submit">Senden</button>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
// Pass PHP variables to JavaScript
|
||||
const OPENAI_API_KEY = "<?php echo $openai_api_key; ?>";
|
||||
const ASSISTANT_ID = "<?php echo $assistant_id; ?>";
|
||||
</script>
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user