MCPcopy
hub / github.com/redis/redis-py / Suggestion

Class Suggestion

redis/commands/search/suggestion.py:6–20  ·  view source on GitHub ↗

Represents a single suggestion being sent or returned from the autocomplete server

Source from the content-addressed store, hash-verified

4
5
6class Suggestion:
7 """
8 Represents a single suggestion being sent or returned from the
9 autocomplete server
10 """
11
12 def __init__(
13 self, string: str, score: float = 1.0, payload: Optional[str] = None
14 ) -> None:
15 self.string = to_string(string)
16 self.payload = to_string(payload)
17 self.score = score
18
19 def __repr__(self) -> str:
20 return self.string
21
22
23class SuggestionParser:

Callers 3

test_auto_completeMethod · 0.90
test_auto_completeMethod · 0.90
__iter__Method · 0.85

Calls

no outgoing calls

Tested by 2

test_auto_completeMethod · 0.72
test_auto_completeMethod · 0.72