Skip to content

Commit

Permalink
add langhub prompt stuffing, works great. prep newrelic logging
Browse files Browse the repository at this point in the history
  • Loading branch information
KastanDay committed Oct 26, 2023
1 parent 877ccf0 commit 3796bf5
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 53 deletions.
79 changes: 28 additions & 51 deletions ai_ta_backend/filtering_contexts.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ai_ta_backend/utils_tokenization.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import os
from typing import Any, List

import supabase
import tiktoken


Expand Down Expand Up @@ -78,6 +77,7 @@ def count_tokens_and_cost(prompt: str, completion: str = '', openai_model_name:
# load_dotenv()

def analyze_conversations(supabase_client: Any = None):
import supabase

if supabase_client is None:
supabase_client = supabase.create_client( # type: ignore
Expand Down
4 changes: 3 additions & 1 deletion newrelic.ini
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
# your account in the New Relic service. For more information on
# storing and generating license keys, see
# https://docs.newrelic.com/docs/apis/intro-apis/new-relic-api-keys/#ingest-license-key
license_key = 8767a5ff7d50108686a7fb3c7a1e7952FFFFNRAL
; license_key =

# WE USE THE ENV VAR NEW_RELIC_LICENSE_KEY

# The application name. Set this to be the name of your
# application as you would like it to show up in New Relic UI.
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ xlrd # for excel ingest
pdfminer # for image OCR
pytesseract # for image OCR
newrelic
ray
langchainhub

# No arize for now, huge build size with these additions.
# arize[AutoEmbeddings, LLM_Evaluation]

0 comments on commit 3796bf5

Please sign in to comment.