Skip to content

Commit

Permalink
fix list_func
Browse files Browse the repository at this point in the history
  • Loading branch information
jph00 committed Sep 29, 2024
1 parent 6ca9c36 commit b107de6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
2 changes: 1 addition & 1 deletion 00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2921,7 +2921,7 @@
" if isinstance(content, abc.Mapping): content=content.get('content', content)\n",
" if not isinstance(content, list): content=[content]\n",
" content = [_mk_content(o, cache if islast else False) for islast,o in loop_last(content)] if content else '.'\n",
" return AttrDict(dict(role=role, content=content, **kw))"
" return dict2obj(dict(role=role, content=content, **kw), list_func=list)"
]
},
{
Expand Down
10 changes: 1 addition & 9 deletions claudette/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,4 @@ def mk_msg(content, # A string, list, or dict containing the contents of the mes
if isinstance(content, abc.Mapping): content=content.get('content', content)
if not isinstance(content, list): content=[content]
content = [_mk_content(o, cache if islast else False) for islast,o in loop_last(content)] if content else '.'
return dict2obj(dict(role=role, content=content, **kw))
return AttrDict(dict(role=role, content=content, **kw))

# %% ../00_core.ipynb
models_aws = ('anthropic.claude-3-haiku-20240307-v1:0', 'anthropic.claude-3-sonnet-20240229-v1:0',
'anthropic.claude-3-opus-20240229-v1:0', 'anthropic.claude-3-5-sonnet-20240620-v1:0')

# %% ../00_core.ipynb
models_goog = 'claude-3-haiku@20240307', 'claude-3-sonnet@20240229', 'claude-3-opus@20240229', 'claude-3-5-sonnet@20240620'
return dict2obj(dict(role=role, content=content, **kw), list_func=list)
2 changes: 1 addition & 1 deletion settings.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ version = 0.0.10
min_python = 3.8
license = apache2
black_formatting = False
requirements = fastcore>=1.5.33 anthropic toolslm
requirements = fastcore>=1.7.10 anthropic toolslm
dev_requirements = google-auth
doc_path = _docs
lib_path = claudette
Expand Down

0 comments on commit b107de6

Please sign in to comment.