Skip to content

Commit 9832e39

Browse files
authored
update docstrings on `get
1 parent 61a57db commit 9832e39

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

sigllm/primitives/prompting/huggingface.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,17 @@
2525

2626

2727
def get_examples(text, k=3):
28-
"""Extracts the content within the first three sets of parentheses in a string.
28+
"""Extracts the content within the first k sets of parentheses in a string.
2929
3030
Args:
31-
text (str): Input string.
31+
text (str):
32+
Input string.
33+
k (int):
34+
Number of examples to return.
3235
3336
Returns:
3437
list:
35-
A list containing the content within the first three sets of parentheses.
38+
A list containing the content within the first k sets of parentheses.
3639
"""
3740
matches = re.findall(r'\(([^)]*)\)', text)
3841
return matches[:k]

0 commit comments

Comments
 (0)