AccessGatewayFilter question
xingjianll opened this issue · 0 comments
xingjianll commented
In AccessGatewayFilter skeleton, there is this method:
def is_start_with(self, request_uri):
"""
Check if the request URI starts with certain prefixes.
:param request_uri: str, the URI of the request
:return: bool, True if the URI starts with certain prefixes, False otherwise
>>> filter = AccessGatewayFilter()
>>> filter.is_start_with('/api/data')
True
"""
the solution is as below:
def is_start_with(self, request_uri):
start_with = ["/api", '/login']
for s in start_with:
if request_uri.startswith(s):
return True
return False
how is it possible that the llm would infer "/api", '/login' are the only possible prefixes, based on the function docstring?