how does chat gpt codex work