mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
(fix) python 3.8 bug
This commit is contained in:
parent
045a8cfdcb
commit
38f9413dfc
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import json, re, xml.etree.ElementTree as ET
|
|||
from jinja2 import Template, exceptions, Environment, meta
|
||||
from typing import Optional, Any
|
||||
import imghdr, base64
|
||||
from typing import List
|
||||
|
||||
|
||||
def default_pt(messages):
|
||||
|
|
@ -633,7 +634,7 @@ def anthropic_messages_pt(messages: list):
|
|||
return new_messages
|
||||
|
||||
|
||||
def extract_between_tags(tag: str, string: str, strip: bool = False) -> list[str]:
|
||||
def extract_between_tags(tag: str, string: str, strip: bool = False) -> List[str]:
|
||||
ext_list = re.findall(f"<{tag}>(.+?)</{tag}>", string, re.DOTALL)
|
||||
if strip:
|
||||
ext_list = [e.strip() for e in ext_list]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue