Compare commits

..

No commits in common. "692eb62d44a8f06cbb42f8d52a9a1985962ee3cb" and "fd94f5826c2996441281b2f13fdfe8dc888b7d3d" have entirely different histories.

3 changed files with 5 additions and 34 deletions

View file

@ -1,12 +0,0 @@
import ollama from 'ollama'
async function name(model: string, prompt: string, system: string,) {
var message = [{ role: 'user', content: prompt }, { role: 'system', content: system }]
var response = await ollama.chat({ model: model, messages: message, stream: true })
for await (const part of response) {
process.stdout.write(part.message.content)
}
}

16
package-lock.json generated
View file

@ -9,7 +9,6 @@
"version": "0.1.0",
"dependencies": {
"next": "14.2.12",
"ollama": "^0.5.9",
"react": "^18",
"react-dom": "^18"
},
@ -3704,15 +3703,6 @@
"url": "https://github.com/sponsors/ljharb"
}
},
"node_modules/ollama": {
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/ollama/-/ollama-0.5.9.tgz",
"integrity": "sha512-F/KZuDRC+ZsVCuMvcOYuQ6zj42/idzCkkuknGyyGVmNStMZ/sU3jQpvhnl4SyC0+zBzLiKNZJnJeuPFuieWZvQ==",
"license": "MIT",
"dependencies": {
"whatwg-fetch": "^3.6.20"
}
},
"node_modules/once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
@ -5071,12 +5061,6 @@
"dev": true,
"license": "MIT"
},
"node_modules/whatwg-fetch": {
"version": "3.6.20",
"resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.6.20.tgz",
"integrity": "sha512-EqhiFU6daOA8kpjOWTL0olhVOF3i7OrFzSYiGsEMB8GcXS+RrzauAERX65xMeNWVqxA6HXH2m69Z9LaKKdisfg==",
"license": "MIT"
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",

View file

@ -9,19 +9,18 @@
"lint": "next lint"
},
"dependencies": {
"next": "14.2.12",
"ollama": "^0.5.9",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"next": "14.2.12"
},
"devDependencies": {
"typescript": "^5",
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"eslint-config-next": "14.2.12",
"postcss": "^8",
"tailwindcss": "^3.4.1",
"typescript": "^5"
"eslint": "^8",
"eslint-config-next": "14.2.12"
}
}