DummyLLM that supports the pipe '|' operator. When used in a chain with a PromptTemplate, the pipe operator returns self, simulating chain composition.
| 57 | |
| 58 | |
| 59 | class DummyLLMWithPipe: |
| 60 | """DummyLLM that supports the pipe '|' operator. |
| 61 | When used in a chain with a PromptTemplate, the pipe operator returns self, |
| 62 | simulating chain composition.""" |
| 63 | |
| 64 | def __or__(self, other): |
| 65 | return self |
| 66 | |
| 67 | def __call__(self, *args, **kwargs): |
| 68 | return {"content": "script single-chunk answer"} |
| 69 | |
| 70 | |
| 71 | @pytest.fixture |
no outgoing calls