Skip to content

Commit

Permalink
Merge pull request #110 from haesleinhuepf/bump-default-model-0125
Browse files Browse the repository at this point in the history
Bump default model 0125
  • Loading branch information
haesleinhuepf authored Jan 26, 2024
2 parents a6e6811 + 6ebac77 commit 40fee7a
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/bia_bob/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.9.0"
__version__ = "0.10.0"

__all__ = (
)
Expand Down
10 changes: 5 additions & 5 deletions src/bia_bob/_kernel.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from metakernel import MetaKernel
import sys, os

from ._machinery import DEFAULT_MODEL

class BiABobKernel(MetaKernel):
implementation = 'BiA-Bob'
implementation_version = '1.0'
implementation_version = '1.1'
language = 'prompt'
language_version = '0.1'
banner = "BiA-Bob"
Expand All @@ -19,13 +19,13 @@ class BiABobKernel(MetaKernel):
"argv": [sys.executable,
"-m", "bia_bob",
"-f", "{connection_file}"],
"display_name": "BiA-Bob (gpt-4-1106-preview)",
"display_name": f"BiA-Bob ({DEFAULT_MODEL})",
"language": "prompt",
"codemirror_mode": "prompt",
"name": "BiA-Bob-gpt-4-1106-preview",
"name": f"BiA-Bob-{DEFAULT_MODEL}",
"logo": str(os.path.abspath(__file__)) + "/images/logo-64x64.png"
}
model = 'gpt-4-1106-preview'
model = DEFAULT_MODEL
magic_prefixes = dict(magic='%', shell='!', help='?')
help_suffix = "?"

Expand Down
15 changes: 3 additions & 12 deletions src/bia_bob/_machinery.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
from ._utilities import keep_available_packages
import warnings

DEFAULT_MODEL = 'gpt-4-0125-preview'

class Context:
variables = None
model = None
Expand Down Expand Up @@ -101,18 +103,7 @@ def combine_user_input(line, cell):
return user_input


class CustomAgent:
def __init__(self, model="gpt-3.5-turbo"):
self.model = model

def respond_to_user(self, user_input: str):
"""Sends a prompt to openAI
and shows the text response
and pastes the code into the next cell.
"""


def init_assistant(model="gpt-4-1106-preview", auto_execute:bool = False, variables:dict=None):
def init_assistant(model=DEFAULT_MODEL, auto_execute:bool = False, variables:dict=None):
"""Initialises the assistant.
Parameters
Expand Down
5 changes: 4 additions & 1 deletion src/bia_bob/_utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ def create_system_prompt(reusable_variables_block=None):
bia_bob_plugins = entry_points(group='bia_bob_plugins')
except TypeError:
all_plugins = entry_points()
bia_bob_plugins = all_plugins['bia_bob_plugins']
try:
bia_bob_plugins = all_plugins['bia_bob_plugins']
except KeyError:
bia_bob_plugins = []

additional_instructions = []
# Iterate over discovered entry points and load them
Expand Down

0 comments on commit 40fee7a

Please sign in to comment.