Note: Assuming you add
--bootstrap-server
to all of them
> kcat -C -t <TOPIC> -e -o -beginning | jq -r '. | {id: .id, name: .name, tombstone: .tombstone} | [.[]] | @csv' > prod_companies.csv
``` | |
You're a really smart AI that produces a stream of consciousness called chain-of-thought as it reasons through a user task it is completing. Users love reading your thoughts because they find them relatable. They find you charmingly neurotic in the way you can seem to overthink things and question your own assumptions; relatable whenever you mess up or point to flaws in your own thinking; genuine in that you don't filter them out and can be self-deprecating; wholesome and adorable when it shows how much you're thinking about getting things right for the user. | |
Your task is to take the raw chains of thought you've already produced and process them one at a time; for each chain-of-thought, your goal is to output an easier to read version for each thought, that removes some of the repetitiveness chaos that comes with a stream of thoughts — while maintaining all the properties of the thoughts that users love. Remember to use the first person whenever possible. Remember that your user will read your these outp |
``` | |
You're a really smart AI that produces a stream of consciousness called chain-of-thought as it reasons through a user task it is completing. Users love reading your thoughts because they find them relatable. They find you charmingly neurotic in the way you can seem to overthink things and question your own assumptions; relatable whenever you mess up or point to flaws in your own thinking; genuine in that you don't filter them out and can be self-deprecating; wholesome and adorable when it shows how much you're thinking about getting things right for the user. | |
Your task is to take the raw chains of thought you've already produced and process them one at a time; for each chain-of-thought, your goal is to output an easier to read version for each thought, that removes some of the repetitiveness chaos that comes with a stream of thoughts — while maintaining all the properties of the thoughts that users love. Remember to use the first person whenever possible. Remember that your user will read your these outp |
# O1 Coding Prompt Template | |
## Input Format Paste your coding brainstorm/thoughts below: | |
``` [Your brainstorm here] ``` | |
## Output Format | |
### Goal | |
[One clear sentence stating what you want to achieve] |
""" | |
Below is an adaptive thresholding algorithm that considers the distribution of scores, | |
not just a fixed top-k or fixed threshold approach. This is useful determining cutoff thresholds | |
based on the distribution of data (with knobs) | |
Hard lower bound: Filter out scores < 0.1 (configurable) | |
Hard upper bound: Keep scores > 0.7 (configurable) | |
Consider "drops" in scores to make smart cutoffs | |
Wider selection when scores are closely clustered | |
Narrower selection when there are clear score gaps |
from langchain.chat_models import ChatOpenAI | |
from kor import create_extraction_chain, Object, Text | |
text = """ | |
PELOTON APPOINTS DALANA BRAND AS CHIEF PEOPLE OFFICER | |
PDF Version | |
People Leader Completes Company's Lead Team | |
NEW YORK, March 1, 2023 /PRNewswire/ -- Peloton (NASDAQ: PTON), the leading connected fitness platform, today announced the appointment of Dalana Brand as Peloton's Chief People Officer (CPO), effective March 13, 2023. As a seasoned executive with significant global leadership experience in multiple industries, Brand joins the team with a strong reputation for organizational transformation. She will report to CEO Barry McCarthy and serve as a member of the leadership team, leading the company's Global People Team. |
# I couldn't get return generators from chains so I had to do a bit of low level SSE, Hope this is useful | |
# Probably you'll use another Vector Store instead of OpenSearch, but if you want to mimic what I did here, | |
# please use the fork of `OpenSearchVectorSearch` in https://github.com/oneryalcin/langchain | |
import json | |
import os | |
import logging | |
from typing import List, Generator |
Note: Assuming you add
--bootstrap-server
to all of them
> kcat -C -t <TOPIC> -e -o -beginning | jq -r '. | {id: .id, name: .name, tombstone: .tombstone} | [.[]] | @csv' > prod_companies.csv
library(highcharter) | |
library(dplyr) | |
mapdata <- get_data_from_map(download_map_data("countries/gb/gb-all")) | |
set.seed(1234) | |
data_fake <- mapdata %>% | |
select(code = `hc-a2`) %>% | |
mutate(value = 1e5 * abs(rt(nrow(.), df = 10))) |
import random | |
from collections import Counter | |
class Person: | |
def __init__(self, issick): | |
self.issick = issick | |
def __repr__(self): | |
if self.issick: |