use baseUrl of openai config in command (#178)

This commit is contained in:
an-lee
2024-01-20 17:54:08 +08:00
committed by GitHub
parent fe8f14bda7
commit f9fbb80f63
3 changed files with 6 additions and 0 deletions

View File

@@ -56,6 +56,7 @@ export const LookupResult = (props: {
{
key: openai.key,
modelName: openai.model,
baseUrl: openai.baseUrl,
}
)
.then((res) => {

View File

@@ -91,6 +91,7 @@ export const MediaCaption = (props: {
ipaCommand(transcription.text, {
key: openai.key,
modelName: openai.model,
baseUrl: openai.baseUrl,
})
.then((result) => {
if (result?.words?.length > 0) {
@@ -130,6 +131,7 @@ export const MediaCaption = (props: {
translateCommand(transcription.text, {
key: openai.key,
modelName: openai.model,
baseUrl: openai.baseUrl,
})
.then((result) => {
if (result) {

View File

@@ -83,6 +83,7 @@ export default () => {
const res = await extractStoryCommand(story.content, {
key: openai.key,
modelName: openai.model,
baseUrl: openai.baseUrl,
});
words = res.words || [];
@@ -219,6 +220,8 @@ export default () => {
},
{
key: openai.key,
modelName: openai.model,
baseUrl: openai.baseUrl,
}
)
.then((res) => {