Session.ask yield GPT's response before calling function
If GPT returns a non-function-calling(normal message) response, Session.ask yield it and finish.
Practice
from CallingGPT.session.session import Session
from examples import draw_and_wrapper_md
import openai
import os
openai.api_key = os.environ["openai_apikey"]
ns = Session([draw_and_wrapper_md])
iter = ns.ask("draw a cat, then convert to markdown")
for n in iter:
print(n)
This PR made some Breaking Changes
Session.ask
is now aiterator
Session.ask
yield GPT's response before calling functionSession.ask
yield it and finish.Practice
outputs: