mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-06 08:16:43 +00:00
(fix) using litellm on python 3.8
This commit is contained in:
parent
c6e6afd125
commit
bbdac823f4
1 changed files with 2 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ from enum import Enum
|
|||
import requests, traceback
|
||||
import json, re, xml.etree.ElementTree as ET
|
||||
from jinja2 import Template, exceptions, Environment, meta
|
||||
from typing import Optional, Any
|
||||
from typing import Optional, Any, List
|
||||
import imghdr, base64
|
||||
|
||||
|
||||
|
|
@ -586,7 +586,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