add default api endpoint
This commit is contained in:
@@ -66,14 +66,14 @@ export const newChatStore = (
|
|||||||
model = "gpt-3.5-turbo-1106",
|
model = "gpt-3.5-turbo-1106",
|
||||||
temperature = 0.7,
|
temperature = 0.7,
|
||||||
dev = false,
|
dev = false,
|
||||||
whisper_api = "",
|
whisper_api = "https://api.openai.com/v1/audio/transcriptions",
|
||||||
whisper_key = "",
|
whisper_key = "",
|
||||||
tts_api = "",
|
tts_api = "https://api.openai.com/v1/audio/speech",
|
||||||
tts_key = "",
|
tts_key = "",
|
||||||
tts_speed = 1.0,
|
tts_speed = 1.0,
|
||||||
tts_speed_enabled = false,
|
tts_speed_enabled = false,
|
||||||
toolsString = "",
|
toolsString = "",
|
||||||
image_gen_api = "",
|
image_gen_api = "https://api.openai.com/v1/images/generations",
|
||||||
image_gen_key = ""
|
image_gen_key = ""
|
||||||
): ChatStore => {
|
): ChatStore => {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@@ -502,13 +502,13 @@ export default (props: {
|
|||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
field="image_gen_api"
|
field="image_gen_key"
|
||||||
help="DALL image gen key, eg. https://api.openai.com/v1/images/generations"
|
help="image generation service api key"
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
<Input
|
<Input
|
||||||
field="image_gen_key"
|
field="image_gen_api"
|
||||||
help="image generation service api key"
|
help="DALL image gen key, eg. https://api.openai.com/v1/images/generations"
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -526,15 +526,17 @@ export default (props: {
|
|||||||
{Tr("Reset")}
|
{Tr("Reset")}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="flex justify-evenly flex-wrap">
|
<div className="flex justify-evenly flex-wrap">
|
||||||
<SetAPIsTemplate
|
{props.chatStore.apiEndpoint && props.chatStore.apiKey && (
|
||||||
label="Chat API"
|
<SetAPIsTemplate
|
||||||
endpoint={props.chatStore.apiEndpoint}
|
label="Chat API"
|
||||||
APIkey={props.chatStore.apiKey}
|
endpoint={props.chatStore.apiEndpoint}
|
||||||
tmps={props.templateAPIs}
|
APIkey={props.chatStore.apiKey}
|
||||||
setTmps={props.setTemplateAPIs}
|
tmps={props.templateAPIs}
|
||||||
/>
|
setTmps={props.setTemplateAPIs}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
|
||||||
{props.chatStore.whisper_api && props.chatStore.whisper_key && (
|
{props.chatStore.whisper_api && props.chatStore.whisper_key && (
|
||||||
<SetAPIsTemplate
|
<SetAPIsTemplate
|
||||||
label="Whisper API"
|
label="Whisper API"
|
||||||
|
|||||||
Reference in New Issue
Block a user