jupyter_plz
jupyter_plz copied to clipboard
can this be set to run with the fauxpilot?
I basically just need to pipe the "text" line from the JSON output to display in ipython or jupyter so I dont have to sift through the JSON file after each call to my server.
result = openai.Completion.create(model='py-model', prompt='def hello', max_tokens=16, temperature=0.1, stop=["\n\n"])
result <OpenAIObject text_completion id=cmpl-SNtKatirygJLhB2Ndt5ndJHeSIXOd at 0x7f3ff35250d0> JSON: { "choices": [ { "finish_reason": "length", "index": 0, "logprobs": null, "text": "_world():\n print("Hello World")\n\nhello_world()" } ], "created": 1681888136, "id": "cmpl-SNtKatirygJLhB2Ndt5ndJHeSIXOd", "model": "codegen", "object": "text_completion", "usage": { "completion_tokens": 16, "prompt_tokens": 2, "total_tokens": 18 } }