Skip to content

Instantly share code, notes, and snippets.

View dmater01's full-sized avatar

Kenneth Terry dmater01

  • e
View GitHub Profile
@dmater01
dmater01 / ADA_v2_README.md
Created December 24, 2024 13:06 — forked from disler/ADA_v2_README.md
Personal AI Assistant: 'Ada' - v0.2

This is not working complete code.

This is strictly a v0.2, scrapy, proof of concept version of a personal AI Assistant working end to end in just ~726 LOC.

This is the second iteration showcasing the two-way prompt aka multi-step human in the loop. The initial, v0, assistant version is here.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

@dmater01
dmater01 / README.md
Created December 24, 2024 13:03 — forked from disler/README.md
Prompt Chaining with QwQ, Qwen, o1-mini, Ollama, and LLM

Prompt Chaining with QwQ, Qwen, o1-mini, Ollama, and LLM

Here we explore prompt chaining with local reasoning models in combination with base models. With shockingly powerful local models like QwQ and Qwen, we can build some powerful prompt chains that let us tap into their capabilities in a immediately useful, local, private, AND free way.

Explore the idea of building prompt chains where the first is a powerful reasoning model that generates a response, and then use a base model to extract the response.

Play with the prompts and models to see what works best for your use cases. Use the o1 series to see how qwq compares.

Setup

  • Bun (to run bun run chain.ts ...)
import openai
openai.api_key = "YOUR API KEY HERE"
model_engine = "text-davinci-003"
chatbot_prompt = """
As an advanced chatbot, your primary goal is to assist users to the best of your ability. This may involve answering questions, providing helpful information, or completing tasks based on user input. In order to effectively assist users, it is important to be detailed and thorough in your responses. Use examples and evidence to support your points and justify your recommendations or solutions.
<conversation history>
User: <user input>
@dmater01
dmater01 / assistant.py
Created February 10, 2023 21:19 — forked from Daniel-V-Richardson/assistant.py
Simple AI Voice Assistant using OpenAI API
import speech_recognition as sr
import pyttsx3
import openai
openai.api_key = "Your API Key"
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voices', voices[1].id)
@dmater01
dmater01 / assistant.py
Created February 10, 2023 21:19 — forked from Daniel-V-Richardson/assistant.py
Simple AI Voice Assistant using OpenAI API
import speech_recognition as sr
import pyttsx3
import openai
openai.api_key = "Your API Key"
engine = pyttsx3.init()
voices = engine.getProperty('voices')
engine.setProperty('voices', voices[1].id)
import datetime
import pandas as pd
from ib_insync import *
pd.set_option('display.max_rows', None)
ib = IB()
ib.connect('127.0.0.1', 7496, clientId=15)
contract = Stock('SPY', 'SMART', 'USD')
import datetime
import pandas as pd
from ib_insync import *
pd.set_option('display.max_rows', None)
ib = IB()
ib.connect('127.0.0.1', 7496, clientId=15)
contract = Stock('SPY', 'SMART', 'USD')