File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
openai-core/src/main/scala/io/cequence/openaiscala/service Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -34,11 +34,18 @@ private class OpenAIMultiServiceRandomAccessAdapter(
3434 protected def calcIndex = Random .nextInt(count)
3535}
3636
37+ /**
38+ * Load distribution for multiple OpenAIService instances using:
39+ * - rotation type (aka round robin)
40+ * - random access/order
41+ */
3742object OpenAIMultiServiceAdapter {
3843
39- def ofRotationType (underlyings : Seq [OpenAIService ]): OpenAIService =
44+ // maybe calling it "round robin" would be better?
45+ def ofRotationType (underlyings : OpenAIService * ): OpenAIService =
4046 new OpenAIMultiServiceRotationAdapter (underlyings)
4147
42- def ofRandomAccessType (underlyings : Seq [OpenAIService ]): OpenAIService =
48+ // TODO: rename to ofRandomOrder
49+ def ofRandomAccessType (underlyings : OpenAIService * ): OpenAIService =
4350 new OpenAIMultiServiceRandomAccessAdapter (underlyings)
4451}
You can’t perform that action at this time.
0 commit comments