MCPcopy Create free account
hub / github.com/codingmoh/open-codex / one_shot_mode

Function one_shot_mode

src/open_codex/main.py:57–65  ·  view source on GitHub ↗
(prompt: str)

Source from the content-addressed store, hash-verified

55 print(f"{RED}Unknown choice. Nothing happened.{RESET}")
56
57def one_shot_mode(prompt: str):
58 from open_codex.agent_builder import AgentBuilder
59 print(f"{BLUE}Using model: phi-4-mini-instruct{RESET}")
60 try:
61 agent = AgentBuilder.get_agent()
62 response = agent.one_shot_mode(prompt)
63 print_response(response)
64 except Exception as e:
65 print(f"{RED}Error: {e}{RESET}")
66
67def print_help_message():
68 print(f"{BLUE}Usage examples:{RESET}")

Callers 1

mainFunction · 0.85

Calls 3

print_responseFunction · 0.85
get_agentMethod · 0.80
one_shot_modeMethod · 0.45

Tested by

no test coverage detected