(self)
| 26 | ) |
| 27 | |
| 28 | def add_cache_control_headers(self): |
| 29 | if self.examples: |
| 30 | self.add_cache_control(self.examples) |
| 31 | else: |
| 32 | self.add_cache_control(self.system) |
| 33 | |
| 34 | if self.repo: |
| 35 | # this will mark both the readonly_files and repomap chunk as cacheable |
| 36 | self.add_cache_control(self.repo) |
| 37 | else: |
| 38 | # otherwise, just cache readonly_files if there are any |
| 39 | self.add_cache_control(self.readonly_files) |
| 40 | |
| 41 | self.add_cache_control(self.chat_files) |
| 42 | |
| 43 | def add_cache_control(self, messages): |
| 44 | if not messages: |
no test coverage detected