Skip to content

Commit

Permalink
remove text_only assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
comhar committed Oct 18, 2024
1 parent 759c8bd commit 8f647c9
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 2 deletions.
1 change: 0 additions & 1 deletion msglm/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def _mk_img(data:bytes)->tuple:
# %% ../nbs/00_core.ipynb
def mk_msg(content:Union[list,str], role:str="user", *args, api:str="openai", text_only=False, **kw)->dict:
"Create an OpenAI/Anthropic compatible message."
if text_only and not isinstance(content, str): raise("`content` muse be a string for `text_only` models.")
m = OpenAiMsg if api == "openai" else AnthropicMsg
return m()(role, content, text_only=text_only, **kw)

Expand Down
1 change: 0 additions & 1 deletion nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,6 @@
"#| export\n",
"def mk_msg(content:Union[list,str], role:str=\"user\", *args, api:str=\"openai\", text_only=False, **kw)->dict:\n",
" \"Create an OpenAI/Anthropic compatible message.\"\n",
" if text_only and not isinstance(content, str): raise(\"`content` muse be a string for `text_only` models.\")\n",
" m = OpenAiMsg if api == \"openai\" else AnthropicMsg\n",
" return m()(role, content, text_only=text_only, **kw)"
]
Expand Down

0 comments on commit 8f647c9

Please sign in to comment.