Skip to content

Commit c6908de

Browse files
authored
Merge pull request #28 from freelawproject/increase_query_max_len
fix(setting): increase max query length
2 parents 18fb0ae + 7d05aa1 commit c6908de

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

.env.example

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ MAX_TOKENS=512
55
OVERLAP_RATIO=0.004
66
MIN_TEXT_LENGTH=1
77
MAX_TEXT_LENGTH = 10000000
8-
MAX_QUERY_LENGTH = 100
8+
MAX_QUERY_LENGTH = 1000
99
MAX_BATCH_SIZE=100
1010
PROCESSING_BATCH_SIZE = 8
1111
POOL_TIMEOUT=3600

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ Model Settings:
6363

6464
- `MAX_QUERY_LENGTH`
6565

66-
Default: `100`
66+
Default: `1000`
6767

6868
The maximum allowable length (in characters) for a query text.
6969

inception/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Settings(BaseSettings):
2121
description="Ratio to calculate number of sentence overlap between chunks",
2222
)
2323
min_text_length: int = 1
24-
max_query_length: int = 100
24+
max_query_length: int = 1000
2525
max_text_length: int = 10_000_000
2626
max_batch_size: int = 100
2727
processing_batch_size: int = 8

tests/test_embedding_service.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ class TestInputValidation:
133133
def test_query_embedding_validation(self, client):
134134
"""Test query endpoint input validation."""
135135

136-
long_query = "Pellentesque tellus felis cursus id velit ac feugiat rutrum massa Mauris dapibus fermentum sagittis Donec viverra mauris a velit"
136+
long_query = (
137+
"Pellentesque tellus felis cursus id velit ac feugiat rutrum massa Mauris dapibus fermentum sagittis Donec viverra mauris a velit ac quam consectetur, a facilisis enim eleifend."
138+
* 10
139+
)
137140
test_cases = [
138141
{
139142
"name": "short text",

0 commit comments

Comments
 (0)