def save_context(context):
 file_path = _get_context_filepath()
 content = format_to_http_prompt(context, excluded_options=EXCLUDED_OPTIONS)
 with io.open(file_path, 'w', encoding='utf-8') as f:
  f.write(content)

def save_context ( context ) : file_path = _get_context_filepath ( ) content = format_to_http_prompt ( context , excluded_options = EXCLUDED_OPTIONS ) with io . open ( file_path , 'w' , encoding = 'utf-8' ) as f : f . write ( content )
save a context object to user data directory .