MCPcopy Create free account
hub / github.com/nlweb-ai/NLWeb / set_mode

Method set_mode

AskAgent/python/core/config.py:599–603  ·  view source on GitHub ↗

Set the application mode (development, production, or testing).

(self, mode: str)

Source from the content-addressed store, hash-verified

597 return self.is_testing_mode() or self.is_development_mode()
598
599 def set_mode(self, mode: str):
600 """Set the application mode (development, production, or testing)."""
601 if mode.lower() not in ['development', 'production', 'testing']:
602 raise ValueError(f"Invalid mode: {mode}. Must be 'development', 'production', or 'testing'")
603 self.mode = mode.lower()
604
605 def get_allowed_sites(self) -> list[str]:
606 """Get the list of allowed sites from NLWeb configuration."""

Callers 4

mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80
mainFunction · 0.80

Calls

no outgoing calls

Tested by 4

mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64
mainFunction · 0.64