Skip to content

Commit 7cb9d59

Browse files
committed
fix the java doc comments
1 parent 6007021 commit 7cb9d59

File tree

3 files changed

+38
-19
lines changed

3 files changed

+38
-19
lines changed

core/com.intellijava.core/src/main/java/com/intellijava/core/controller/RemoteLanguageModel.java

Lines changed: 24 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ public class RemoteLanguageModel {
5454
*
5555
* Creates an instance of the class and sets up the key and the API type.
5656
*
57-
* @param keyValue the API key.
58-
* @param keyType either openai (default) or cohere or send empty string for
59-
* default value.
57+
* @param keyValue the API key.
58+
* @param keyTypeString either openai (default) or cohere or send empty string
59+
* for default value.
6060
*
6161
* @throws IllegalArgumentException if the keyType passed is not "openai".
6262
*
@@ -77,6 +77,22 @@ public RemoteLanguageModel(String keyValue, String keyTypeString) {
7777
}
7878
}
7979

80+
/**
81+
* Constructor for the RemoteLanguageModel class.
82+
*
83+
* Creates an instance of the class and sets up the API key and the enum key
84+
* type.
85+
*
86+
* @param keyValue the API key.
87+
* @param keyType enum version from the key type (SupportedModels).
88+
*
89+
* @throws IllegalArgumentException if the keyType passed is not "openai".
90+
*
91+
*/
92+
public RemoteLanguageModel(String keyValue, SupportedLangModels keyType) {
93+
this.initiate(keyValue, keyType);
94+
}
95+
8096
/**
8197
* Get the supported models names as array of string
8298
*
@@ -85,30 +101,20 @@ public RemoteLanguageModel(String keyValue, String keyTypeString) {
85101
public List<String> getSupportedModels() {
86102
SupportedLangModels[] values = SupportedLangModels.values();
87103
List<String> enumValues = new ArrayList<>();
88-
104+
89105
for (int i = 0; i < values.length; i++) {
90106
enumValues.add(values[i].name());
91107
}
92-
108+
93109
return enumValues;
94110
}
95111

96112
/**
97-
* Constructor for the RemoteLanguageModel class.
98-
*
99-
* Creates an instance of the class and sets up the API key and the enum key
100-
* type.
101-
*
102-
* @param keyValue the API key.
103-
* @param keyType enum version from the key type (SupportedModels).
104-
*
105-
* @throws IllegalArgumentException if the keyType passed is not "openai".
113+
* Common function to initiate the class from any constructor.
106114
*
115+
* @param keyValue the API key.
116+
* @param keyType enum version from the key type (SupportedModels).
107117
*/
108-
public RemoteLanguageModel(String keyValue, SupportedLangModels keyType) {
109-
this.initiate(keyValue, keyType);
110-
}
111-
112118
private void initiate(String keyValue, SupportedLangModels keyType) {
113119
// set the model type
114120
this.keyType = keyType;

core/com.intellijava.core/src/main/java/com/intellijava/core/model/CohereLanguageResponse.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ public class CohereLanguageResponse extends BaseRemoteModel{
1515
private List<Generation> generations;
1616
private String prompt;
1717

18+
/**
19+
*
20+
* Generation is wrapper for the response
21+
*
22+
* @author github.com/Barqawiz
23+
*
24+
*/
1825
public static class Generation {
1926
private String id;
2027
private String text;
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
package com.intellijava.core.model;
22

3+
/**
4+
* Supported language models.
5+
*
6+
* @author github.com/Barqawiz
7+
*
8+
*/
39
public enum SupportedLangModels {
4-
openai, cohere;
10+
/** openai model */openai, /** cohere model */cohere;
511
}

0 commit comments

Comments
 (0)