(question string, writer io.Writer, history []*RawMessage, prompt string, knowledgeMessages []*RawMessage, toolSession *ToolSession, lang string)
| 48 | } |
| 49 | |
| 50 | func (p *fileContentProvider) QueryText(question string, writer io.Writer, history []*RawMessage, prompt string, knowledgeMessages []*RawMessage, toolSession *ToolSession, lang string) (*ModelResult, error) { |
| 51 | question, err := replaceFileURLs(question, p.providerType, lang) |
| 52 | if err != nil { |
| 53 | return nil, err |
| 54 | } |
| 55 | |
| 56 | history, err = replaceFileURLsInMessages(history, p.providerType, lang) |
| 57 | if err != nil { |
| 58 | return nil, err |
| 59 | } |
| 60 | |
| 61 | return p.provider.QueryText(question, writer, history, prompt, knowledgeMessages, toolSession, lang) |
| 62 | } |
| 63 | |
| 64 | func wrapFileContentProvider(providerType string, provider ModelProvider) ModelProvider { |
| 65 | return &fileContentProvider{ |
nothing calls this directly
no test coverage detected