Skip to content

Commit ea060da

Browse files
committed
fix(clients): ernie model name is not properly mapped from enum
1 parent 112f090 commit ea060da

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/clients/ernie/ErnieClientService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ErnieClientService(private val cs: CoroutineScope) : LLMClientService<Erni
3434
.secretKey(secretKey)
3535
.modelName(client.modelId)
3636
.temperature(client.temperature.toDouble())
37-
// Fix https://github.com/langchain4j/langchain4j/pull/1426. Remove this 'if' statement if langchain4j releases a new version that resolves this issue.
37+
// Fix https://github.com/langchain4j/langchain4j/pull/1426. Remove this 'if' statement when langchain4j releases a new version that resolves this issue.
3838
if (client.modelId == QianfanChatModelNameEnum.ERNIE_SPEED_128K.modelName){
3939
builder.endpoint("ernie-speed-128k")
4040
}

src/main/kotlin/com/github/blarc/ai/commits/intellij/plugin/settings/clients/ernie/ErnieClientSharedState.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ class ErnieClientSharedState : PersistentStateComponent<ErnieClientSharedState>,
2020

2121
@XCollection(style = XCollection.Style.v2)
2222
override val modelIds = QianfanChatModelNameEnum.entries.stream()
23-
.map { it.toString() }
23+
.map { it.modelName }
2424
.toList()
2525
.toMutableSet()
2626

src/main/resources/icons/ernie.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)