issues
search
rgbkrk
/
genai
What if GPT could help you notebook?
BSD 3-Clause "New" or "Revised" License
351
stars
36
forks
source link
create a more ipythonic context manager
#62
Closed
rgbkrk
closed
1 year ago
rgbkrk
commented
1 year ago
Introduced a
Context
class to capture IPython history as
ChatCompletion
compatible messages while retaining execution count
Replaced the
get_historical_context
function with the
build_context
function, which constructs the context using the new Context class.
Updated
%%assist
to use
build_context
and trim down the messages based on estimated token size
Context
class to capture IPython history asChatCompletion
compatible messages while retaining execution countget_historical_context
function with thebuild_context
function, which constructs the context using the new Context class.%%assist
to usebuild_context
and trim down the messages based on estimated token size