Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9018045

Browse files
vazirimmandel
authored andcommitted
Bump litellm and openai versions (#920)
Signed-off-by: Mandana Vaziri <[email protected]>
1 parent 86774d7 commit 9018045

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

examples/rag/rag.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def rag_retrieve(
105105
# Typically litellm.exceptions.APIConnectionError
106106
return f"Unexpected {type(be)}: be={be}"
107107

108-
data = response.data[0]["embedding"]
108+
data = response.data[0]["embedding"] # type: ignore
109109

110110
milvus_client = get_or_create_client(database_name)
111111
search_res = milvus_client.search(

examples/rag/rag_library1.pdl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ text:
1010
return:
1111
lang: python
1212
code: |
13-
from examples.rag.rag import parse
14-
result = parse(filename, chunk_size, chunk_overlap)
13+
import rag
14+
result = rag.parse(filename, chunk_size, chunk_overlap)
1515
- def: rag_index
1616
function:
1717
inp: list # This is a list[str], but PDL doesn't allow that type
@@ -22,8 +22,8 @@ text:
2222
return:
2323
lang: python
2424
code: |
25-
from examples.rag.rag import rag_index
26-
result = rag_index(inp, encoder_model, embed_dimension, database_name, collection_name)
25+
import rag
26+
result = rag.rag_index(inp, encoder_model, embed_dimension, database_name, collection_name)
2727
- def: rag_retrieve
2828
function:
2929
inp: str
@@ -34,5 +34,5 @@ text:
3434
return:
3535
lang: python
3636
code: |
37-
from examples.rag.rag import rag_retrieve
38-
result = rag_retrieve(inp, encoder_model, limit, database_name, collection_name)
37+
import rag
38+
result = rag.rag_retrieve(inp, encoder_model, limit, database_name, collection_name)

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ dependencies = [
1212
"jinja2~=3.0",
1313
"PyYAML~=6.0",
1414
"jsonschema~=4.0",
15-
"litellm>=1.57.3,!=1.59.9,!=1.63.14",
16-
"openai==1.61.0",
15+
"litellm>=1.66.0",
16+
"openai>=1.66.1",
1717
"termcolor~=2.0",
1818
"ipython>=8,<10",
1919
"json-repair~=0.35",

tests/test_ast_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class MapCounter:
2525
def __init__(self):
2626
self.cpt = 0
2727

28-
def count(map_self, ast): # pylint: disable=no-self-argument
28+
def count(map_self, ast): # pylint: disable=no-self-argument # type: ignore
2929
map_self.cpt += 1
3030

3131
class C(MappedFunctions):
32-
def f_block(_, block): # pylint: disable=no-self-argument
32+
def f_block(_, block): # pylint: disable=no-self-argument # type: ignore
3333
return map_self.count(block)
3434

3535
_ = map_block_children(C(), ast)

tests/test_examples_run.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
pathlib.Path("pdl-live-react") / "demos" / "error.pdl",
4747
pathlib.Path("pdl-live-react") / "demos" / "demo1.pdl",
4848
pathlib.Path("pdl-live-react") / "demos" / "demo2.pdl",
49+
pathlib.Path("pdl-live-react")
50+
/ "src-tauri"
51+
/ "tests"
52+
/ "cli"
53+
/ "read-stdin.pdl",
4954
# For now, skip the granite-io examples
5055
pathlib.Path("examples") / "granite-io" / "granite_io_hallucinations.pdl",
5156
pathlib.Path("examples") / "granite-io" / "granite_io_openai.pdl",

0 commit comments

Comments
 (0)