@@ -60,7 +60,7 @@ public void resetNative() {
60
60
* @param llamaCallback callback object to receive results.
61
61
*/
62
62
public int generate (String prompt , LlamaCallback llamaCallback ) {
63
- return generate (prompt , DEFAULT_SEQ_LEN , DEFAULT_ECHO , llamaCallback );
63
+ return generate (prompt , DEFAULT_SEQ_LEN , llamaCallback , DEFAULT_ECHO );
64
64
}
65
65
66
66
/**
@@ -71,30 +71,30 @@ public int generate(String prompt, LlamaCallback llamaCallback) {
71
71
* @param llamaCallback callback object to receive results.
72
72
*/
73
73
public int generate (String prompt , int seqLen , LlamaCallback llamaCallback ) {
74
- return generate (null , 0 , 0 , 0 , prompt , seqLen , DEFAULT_ECHO , llamaCallback );
74
+ return generate (null , 0 , 0 , 0 , prompt , seqLen , llamaCallback , DEFAULT_ECHO );
75
75
}
76
76
77
77
/**
78
78
* Start generating tokens from the module.
79
79
*
80
80
* @param prompt Input prompt
81
+ * @param llamaCallback callback object to receive results
81
82
* @param echo indicate whether to echo the input prompt or not (text completion vs chat)
82
- * @param llamaCallback callback object to receive results.
83
83
*/
84
- public int generate (String prompt , boolean echo , LlamaCallback llamaCallback ) {
85
- return generate (null , 0 , 0 , 0 , prompt , DEFAULT_SEQ_LEN , echo , llamaCallback );
84
+ public int generate (String prompt , LlamaCallback llamaCallback , boolean echo ) {
85
+ return generate (null , 0 , 0 , 0 , prompt , DEFAULT_SEQ_LEN , llamaCallback , echo );
86
86
}
87
87
88
88
/**
89
89
* Start generating tokens from the module.
90
90
*
91
91
* @param prompt Input prompt
92
92
* @param seqLen sequence length
93
+ * @param llamaCallback callback object to receive results
93
94
* @param echo indicate whether to echo the input prompt or not (text completion vs chat)
94
- * @param llamaCallback callback object to receive results.
95
95
*/
96
- public int generate (String prompt , int seqLen , boolean echo , LlamaCallback llamaCallback ) {
97
- return generate (null , 0 , 0 , 0 , prompt , seqLen , echo , llamaCallback );
96
+ public int generate (String prompt , int seqLen , LlamaCallback llamaCallback , boolean echo ) {
97
+ return generate (null , 0 , 0 , 0 , prompt , seqLen , llamaCallback , echo );
98
98
}
99
99
100
100
/**
@@ -106,8 +106,8 @@ public int generate(String prompt, int seqLen, boolean echo, LlamaCallback llama
106
106
* @param channels Input image number of channels
107
107
* @param prompt Input prompt
108
108
* @param seqLen sequence length
109
- * @param echo indicate whether to echo the input prompt or not (text completion vs chat)
110
109
* @param llamaCallback callback object to receive results.
110
+ * @param echo indicate whether to echo the input prompt or not (text completion vs chat)
111
111
*/
112
112
@ DoNotStrip
113
113
public native int generate (
@@ -117,8 +117,8 @@ public native int generate(
117
117
int channels ,
118
118
String prompt ,
119
119
int seqLen ,
120
- boolean echo ,
121
- LlamaCallback llamaCallback );
120
+ LlamaCallback llamaCallback ,
121
+ boolean echo );
122
122
123
123
/**
124
124
* Prefill an LLaVA Module with the given images input.
@@ -171,12 +171,12 @@ public long prefillPrompt(String prompt, long startPos, int bos, int eos) {
171
171
* @param prompt The text prompt to LLaVA.
172
172
* @param seqLen The total sequence length, including the prompt tokens and new tokens.
173
173
* @param startPos The starting position in KV cache of the input in the LLM.
174
- * @param echo indicate whether to echo the input prompt or not
175
174
* @param llamaCallback callback object to receive results.
175
+ * @param echo indicate whether to echo the input prompt or not.
176
176
* @return The error code.
177
177
*/
178
178
public native int generateFromPos (
179
- String prompt , int seqLen , long startPos , boolean echo , LlamaCallback callback );
179
+ String prompt , int seqLen , long startPos , LlamaCallback callback , boolean echo );
180
180
181
181
/** Stop current generate() before it finishes. */
182
182
@ DoNotStrip
0 commit comments