MCPcopy Create free account
hub / github.com/OpenOSINT/OpenOSINT / _print_config

Function _print_config

openosint/repl.py:185–214  ·  view source on GitHub ↗
(
    api_key: str | None,
    provider: str,
    model: str,
    ollama_host: str,
    is_pdf_disabled: bool,
)

Source from the content-addressed store, hash-verified

183
184
185def _print_config(
186 api_key: str | None,
187 provider: str,
188 model: str,
189 ollama_host: str,
190 is_pdf_disabled: bool,
191) -> None:
192 masked = ("*" * 20 + api_key[-6:]) if api_key and len(api_key) > 6 else "not set"
193 rows = [
194 f"[bold]Provider:[/] {provider}",
195 f"[bold]Model:[/] {model}",
196 ]
197 if provider == "anthropic":
198 rows.append(f"[bold]API Key:[/] {masked}")
199 else:
200 rows.append(f"[bold]Ollama:[/] {ollama_host}")
201 rows += [
202 "[bold]Reports:[/] ./reports/",
203 f"[bold]PDF:[/] {'disabled' if is_pdf_disabled else 'enabled'}",
204 ]
205 console.print()
206 console.print(
207 Panel(
208 "\n".join(rows),
209 title="[bold]Configuration[/]",
210 border_style="#1e293b",
211 padding=(0, 2),
212 )
213 )
214 console.print()
215
216
217# ---------------------------------------------------------------------------

Callers 1

runMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected