()
| 2 | import chatWithDocsMemory from '../memory/chat-with-docs'; |
| 3 | |
| 4 | const buildPipe = (): PipeI => ({ |
| 5 | apiKey: process.env.LANGBASE_API_KEY!, |
| 6 | name: 'pipe-with-memory', |
| 7 | description: '', |
| 8 | status: 'private', |
| 9 | model: 'openai:gpt-4o-mini', |
| 10 | stream: true, |
| 11 | json: false, |
| 12 | store: true, |
| 13 | moderate: true, |
| 14 | top_p: 1, |
| 15 | max_tokens: 1000, |
| 16 | temperature: 0.7, |
| 17 | presence_penalty: 1, |
| 18 | frequency_penalty: 1, |
| 19 | stop: [], |
| 20 | tool_choice: 'auto', |
| 21 | parallel_tool_calls: false, |
| 22 | messages: [ |
| 23 | {role: 'system', content: `You are a helpful AI assistant.`}, |
| 24 | { |
| 25 | role: 'system', |
| 26 | name: 'rag', |
| 27 | content: |
| 28 | "Below is some CONTEXT for you to answer the questions. ONLY answer from the CONTEXT. CONTEXT consists of multiple information chunks. Each chunk has a source mentioned at the end.\n\nFor each piece of response you provide, cite the source in brackets like so: [1].\n\nAt the end of the answer, always list each source with its corresponding number and provide the document name. like so [1] Filename.doc.\n\nIf you don't know the answer, just say that you don't know. Ask for more context and better questions if needed.", |
| 29 | }, |
| 30 | ], |
| 31 | variables: [], |
| 32 | memory: [chatWithDocsMemory()], |
| 33 | tools: [], |
| 34 | }); |
| 35 | |
| 36 | export default buildPipe; |
nothing calls this directly
no outgoing calls
no test coverage detected