Skip to content

Instantly share code, notes, and snippets.

View business24ai's full-sized avatar

business24ai

  • BUSINESS24.AI GmbH
  • Hamburg
  • 18:35 (UTC +02:00)
View GitHub Profile
@business24ai
business24ai / app.py
Created February 4, 2024 23:06
AutoGen local
from autogen import AssistantAgent, UserProxyAgent, config_list_from_json
config_list_paid = [
{
"model": "gpt-4-1106-preview",
"api_key": "YOUR-KEY"
}
]
config_list_free = [
@business24ai
business24ai / save_note_to_obsidian.py
Created December 31, 2023 11:29
An AutoGen Studio skill to store markdown content to our second brain obsidian
# A skill to store markdown content to our second brain obsidian
import os
def store_note_to_obsidian(filename, content):
"""
Store markdown content to our second brain in a local Obsidian vault
:param filename: str, filename of the note
:param content: str, content of the note as markdown
@business24ai
business24ai / langsmith_getting_started.py
Created August 13, 2023 07:33
LangSmith getting started
from dotenv import load_dotenv
from langchain.chat_models import ChatOpenAI
# Load env variables
load_dotenv()
llm = ChatOpenAI(temperature=0, tags=["tag-source-app-py"])
print(llm.predict("Why do we finish a setup with hello, world!"))
@business24ai
business24ai / get_the_current_weather_of_a_location.js
Created July 15, 2023 04:39
Flowise get_the_current_weather_of_a_location
/*
* You can use any libraries imported in Flowise
* You can use properties specified in Output Schema as variables. Ex: Property = userid, Variable = $userid
* Must return a string value at the end of function
*/
const fetch = require('node-fetch');
const url = 'https://api.open-meteo.com/v1/forecast?latitude=' + $latitude + '&longitude=' + $longitude + '&current_weather=true';
const options = {
method: 'GET',
@business24ai
business24ai / get_ip_address_geo_location.js
Last active November 6, 2023 06:39
Flowise get_ip_address_geo_location
const fetch = require('node-fetch');
const url = 'https://free-geo-ip.p.rapidapi.com/json/' + $ip;
const options = {
method: 'GET',
headers: {
'X-RapidAPI-Key': 'YOUR_RAPIDAPI_KEY',
'X-RapidAPI-Host': 'free-geo-ip.p.rapidapi.com'
}
};