Skip to content

Commit 608eb74

Browse files
committed
feat: add llama_max_parallel_sequences module function
1 parent 8850337 commit 608eb74

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ext/llama_cpp/llama_cpp.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1322,6 +1322,14 @@ static VALUE rb_llama_max_devices(VALUE self) {
13221322
return SIZET2NUM(llama_max_devices());
13231323
}
13241324

1325+
/**
1326+
* @overload llama_max_parallel_sequences
1327+
* @return [Integer]
1328+
*/
1329+
static VALUE rb_llama_max_parallel_sequences(VALUE self) {
1330+
return SIZET2NUM(llama_max_parallel_sequences());
1331+
}
1332+
13251333
/**
13261334
* @overload llama_supports_mmap?
13271335
* @return [Boolean]
@@ -4684,6 +4692,9 @@ void Init_llama_cpp(void) {
46844692
/* llama_max_devices */
46854693
rb_define_module_function(rb_mLlamaCpp, "llama_max_devices", rb_llama_max_devices, 0);
46864694

4695+
/* llama_max_parallel_sequences */
4696+
rb_define_module_function(rb_mLlamaCpp, "llama_max_parallel_sequences", rb_llama_max_parallel_sequences, 0);
4697+
46874698
/* llama_supports_mmap */
46884699
rb_define_module_function(rb_mLlamaCpp, "llama_supports_mmap?", rb_llama_supports_mmap, 0);
46894700

0 commit comments

Comments
 (0)