This commit is contained in:
科林_Cyril Pilgrim
2025-01-30 00:32:58 +08:00
parent 58b5c28edd
commit 91e16cd3a2
3 changed files with 50 additions and 3 deletions
Binary file not shown.
+3 -3
View File
@@ -17,10 +17,10 @@ class OpenAICompatibleLoader:
def INPUT_TYPES(cls):
return {
"required": {
"api_base": ("STRING", {"default": "https://api.openai.com"}),
"api_key": ("STRING", {"default": ""}),
"prompt": ("STRING", {"multiline": True}),
"model": ("STRING", {"default": "gpt-3.5-turbo"}),
"api_base": ("STRING", {"default": "https://api.openai.com"}),
"api_key": ("PASSWORD", {"default": ""}),
"prompt": ("STRING", {"multiline": True}),
"temperature": ("FLOAT", {"default": 0.7, "min": 0.0, "max": 2.0}),
"max_tokens": ("INT", {"default": 512, "min": 1, "max": 4096}),
},
+47
View File
@@ -0,0 +1,47 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>API Key Toggle</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
}
#api-key {
width: 300px;
padding: 5px;
}
.button {
padding: 10px 20px;
font-size: 16px;
cursor: pointer;
margin-top: 10px;
}
</style>
</head>
<body>
<h1>API Key Visibility Toggle</h1>
<input type="text" id="api-key" value="Your API Key Here">
<button class="button" id="toggle-button">Hide API Key</button>
<script>
const apiKeyInput = document.getElementById('api-key');
const toggleButton = document.getElementById('toggle-button');
let isHidden = false;
toggleButton.addEventListener('click', () => {
if (isHidden) {
apiKeyInput.type = 'text';
toggleButton.textContent = 'Hide API Key';
} else {
apiKeyInput.type = 'password';
toggleButton.textContent = 'Show API Key';
}
isHidden = !isHidden;
});
</script>
</body>
</html>