2 Commits

Author SHA1 Message Date
joakimp 60ad3d109b Testar med mistral-nemo 2024-07-24 08:55:04 +02:00
joakimp 8ddb920e99 Felsökning. 2024-07-24 08:54:40 +02:00
2 changed files with 11 additions and 4 deletions
+2 -1
View File
@@ -14,7 +14,8 @@ ollama:
# model: "phi3:mini" # Select a model supported by the Ollama server
# model: "llama3:70b" # Select a model supported by the Ollama server
# model: "llama3:latest" # Select a model supported by the Ollama server
model: "mannix/llama3-8b-ablitered-v3:latest" # Select a model supported by the Ollama server
# model: "mannix/llama3-8b-ablitered-v3:latest" # Select a model supported by the Ollama server
model: "mistral-nemo:latest" # Select a model supported by the Ollama server
# Logging comment out the whole section for default level which is INFO
logging:
+9 -3
View File
@@ -1,7 +1,7 @@
# Import the necessary functions from ollama, Flask, requests, threading
from ollama import Client
from flask import Flask, request, jsonify
from flask import Flask, request, jsonify, send_from_directory
from flask_cors import CORS, cross_origin # CORS stands for Cross-Origin Resource Sharing. This is necessary to allow the frontend to make requests to our backend.
import requests
import json
@@ -22,10 +22,16 @@ def serve_static(filename):
return send_from_directory(app.config['STATIC_FOLDER'], filename)
# CORS(app, resources={
# r"/api/chat": {
# "origins": "*",
# "headers": ["Origin", "Content-Type", "Authorization"],
# }
# })
CORS(app, resources={
r"/api/chat": {
"origins": "*",
"headers": ["Origin", "Content-Type", "Authorization"],
"origins": "*"
}
})