Kashish commited on
Commit ·
7744be2
1
Parent(s): 58bd9c7
use prompt.partial instead of bind for format_instructions
Browse files- rag/chain.py +2 -2
rag/chain.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
|
| 3 |
from functools import lru_cache
|
| 4 |
from typing import Any
|
|
@@ -36,7 +36,7 @@ def get_chain() -> Any:
|
|
| 36 |
)
|
| 37 |
)
|
| 38 |
output_parser = PydanticOutputParser(pydantic_object=StructuredAnswer)
|
| 39 |
-
prompt_with_format = prompt.
|
| 40 |
format_instructions=output_parser.get_format_instructions()
|
| 41 |
)
|
| 42 |
|
|
|
|
| 1 |
+
from __future__ import annotations
|
| 2 |
|
| 3 |
from functools import lru_cache
|
| 4 |
from typing import Any
|
|
|
|
| 36 |
)
|
| 37 |
)
|
| 38 |
output_parser = PydanticOutputParser(pydantic_object=StructuredAnswer)
|
| 39 |
+
prompt_with_format = prompt.partial(
|
| 40 |
format_instructions=output_parser.get_format_instructions()
|
| 41 |
)
|
| 42 |
|