Comments (2)
Yes, Chris is totally correct here. And we're looking to make this more built-in and easy in the project. For now you can use techniques like Chris mentioned above.
from fabric.
For using it with Ollama, install the python library of ollama instead of openai
See https://github.com/ollama/ollama-python
Then just comment out or remove lines 29 through 34 in file https://github.com/danielmiessler/fabric/blob/main/infrastructure/server/fabric_api_server.py
These are
# Load your OpenAI API key from a file
with open("openai.key", "r") as key_file:
openai.api_key = key_file.read().strip()
## Define our own client
client = openai.OpenAI(api_key = openai.api_key)
And also exchange lines 124 through 132 which are
response = openai.chat.completions.create(
model="gpt-4-1106-preview",
messages=messages,
temperature=0.0,
top_p=1,
frequency_penalty=0.1,
presence_penalty=0.1,
)
assistant_message = response.choices[0].message.content
with
response = ollama.chat(model='mistral', messages=messages)
assistant_message = response['message']['content'].strip()
Download and use the Ollama Model of your choosing instead of mistral...
It should be considered to have some kind of configuration as of what model should be chosen for what specific task. Maybe by introducing an additional MD file such as "Model.md". Regarding Ollama it whould then be possible to further instruct the respective model in doing whatever before solving the task.
from fabric.
Related Issues (20)
- Feature: Compatibility with OLLAMA, locally hosted AI LLMS HOT 5
- problem running poetry shell HOT 3
- Idea - Developer Volunteer Pipeline HOT 1
- Issue running poetry in macos HOT 1
- Cost management measures HOT 1
- Non-functional related: create github templates for PR's, issues and bug reports
- [Question]: After setting up fabric with my openai gpt api key it looks like the model is still trying to use a differnet api key ending with "92xm". Are there setup instructions I can follow to run my own client/server/mill functions with my own api keys? HOT 2
- [Bug]: setup.sh error on 'sed' command on macOS HOT 1
- [Bug]: Failing to import Installer HOT 1
- Visual Studio - Powershell HOT 5
- [Question]: Fabric not found in the current Poetry environment HOT 4
- Server and client parts are missing HOT 1
- [Feature request]: integrate new audit to text functionality, preferably without a toll on the install process HOT 13
- [Feature request]: helpers vm set transcript language HOT 1
- [Question]: helpers vm dependencies HOT 1
- [Feature request]: Update ReadMe to replace pbpaste in examples HOT 3
- Install process: check for non-existent .bashrc / .zshrc files & prompt user to create them if they aren't there. HOT 1
- [Question]: Default Model Settings HOT 1
- [Feature request]: setup option to not fill the shell rc files with aliases HOT 2
- [Feature request]: allow the default model to be set with env variables HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fabric.