Skip to content

Commit a21c92a

Browse files
committed
rename file and update text for llms.txt
1 parent 62e44b6 commit a21c92a

File tree

4 files changed

+26
-3
lines changed

4 files changed

+26
-3
lines changed

defillama-openapi-free.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"openapi": "3.0.0",
33
"info": {
4-
"description": "\n\nNeed higher rate limits or priority support? We offer a premium plan for 300$/mo. To get it, go to https://defillama.com/subscription\n \n\n download the standard <a href='https://raw.githubusercontent.com/DefiLlama/api-docs/refs/heads/main/defillama-llms.txt'>llms.txt</a> file(guide for AI models)",
4+
"description": "\n\nNeed higher rate limits or priority support? We offer a premium plan for 300$/mo. To get it, go to https://defillama.com/subscription \n\n\n Coding with AI? Paste this link to LLM-specific docs for best results \n<a href='/llms.txt'>llms.txt</a>",
55
"version": "1.0.0-oas3",
66
"title": "DefiLlama API"
77
},

defillama-openapi-pro.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"info": {
44
"title": "DefiLlama Pro - OpenAPI 3.0",
55
"version": "1.0.0",
6-
"description": "Docs for DefiLlama's Pro API \n\n download the standard <a href='https://raw.githubusercontent.com/DefiLlama/api-docs/refs/heads/main/defillama-llms.txt'>llms.txt</a> file(guide for AI models)"
6+
"description": "Docs for DefiLlama's Pro API \n\n\n Coding with AI? Paste this link to LLM-specific docs for best results \n<a href='/llms.txt'>llms.txt</a>"
77
},
88
"servers": [
99
{

examples/web/vite.config.ts

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
11
import vue from '@vitejs/plugin-vue'
22
import { defineConfig } from 'vite'
3+
import path from 'path'
4+
import fs from 'fs'
35

46
// https://vitejs.dev/config/
57
export default defineConfig({
6-
plugins: [vue()],
8+
plugins: [
9+
vue(),
10+
{
11+
name: 'serve-llms-txt',
12+
configureServer(server) {
13+
server.middlewares.use((req, res, next) => {
14+
if (req.url === '/llms.txt') {
15+
const filePath = path.resolve(__dirname, '../../llms.txt')
16+
if (fs.existsSync(filePath)) {
17+
res.setHeader('Content-Type', 'text/plain')
18+
fs.createReadStream(filePath).pipe(res)
19+
} else {
20+
res.statusCode = 404
21+
res.end('Not Found')
22+
}
23+
} else {
24+
next()
25+
}
26+
})
27+
},
28+
},
29+
],
730
server: {
831
port: 5050,
932
open: true,
File renamed without changes.

0 commit comments

Comments
 (0)