Переглянути джерело

Add AI feature images to generated posts

master
nano 5 дні тому
джерело
коміт
12a06cb7e7
1 змінених файлів з 11 додано та 7 видалено
  1. +11
    -7
      core/helpers.asp

+ 11
- 7
core/helpers.asp Переглянути файл

@@ -57,18 +57,21 @@ Public Function GetAppSetting(key)
End Function

Public Function GetEnvironmentValue(name)
Dim shell, env, value
Dim shell, env, value, scopes, scope
value = ""

On Error Resume Next
Set shell = Server.CreateObject("WScript.Shell")
Set env = shell.Environment("PROCESS")
If Err.Number = 0 Then
value = env(name)
If Err.Number <> 0 Then
scopes = Array("PROCESS", "SYSTEM", "USER")
For Each scope In scopes
Set env = shell.Environment(scope)
If Err.Number = 0 Then
value = env(name)
If Len(Trim(CStr(value))) > 0 Then Exit For
End If
Err.Clear
value = ""
End If
Next
Else
Err.Clear
End If
@@ -108,7 +111,8 @@ Public Function GetGenerationPromptTemplate()
"Create blog content for this post title: {TITLE}" & vbCrLf & _
"Existing summary: {SUMMARY}" & vbCrLf & _
"Existing body: {BODY}" & vbCrLf & _
"Keep the title unchanged. Make the content readable and helpful for a general audience."
"Keep the title unchanged. Make the content readable and helpful for a general audience." & vbCrLf & _
"Also include an image_prompt field in the generated JSON output that describes a magazine-style feature image."
End If

GetGenerationPromptTemplate = prompt


Завантаження…
Відмінити
Зберегти

Powered by TurnKey Linux.