Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Langfuse Integration and Fix Audio Processing #355

Merged
merged 40 commits into from
Jan 18, 2025
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
068680f
feat: setup langfuse
MrOrz Jan 1, 2025
fd8ce9a
chore: upgrade openai sdk
MrOrz Jan 1, 2025
934904b
fix(util): make langfuse imports work
MrOrz Jan 1, 2025
9ff9e82
fix(util): change ext back as it does not help
MrOrz Jan 1, 2025
bb6498e
fix(package.json): enable experimental-vm-modules so that jest does not
MrOrz Jan 1, 2025
f0c3807
fix(graphql): typo in openai SDK method
MrOrz Jan 1, 2025
a0d1bd2
fix(package): update fluent-ffmpeg to support ffmpeg7 mp3 encoder
MrOrz Jan 15, 2025
3b0b07f
fix(graphql): fix reading segment from undefined error
MrOrz Jan 15, 2025
63e7e68
fix(graphql): handle ffmpeg errors and update audio file format to mp3
MrOrz Jan 15, 2025
071b85b
fix(graphql): streamline ffmpeg audio processing and update file type…
MrOrz Jan 15, 2025
bff9380
fix(tests): skip audio transcription test due to fluent-ffmpeg issue
MrOrz Jan 15, 2025
e062fad
fix(tests): update OpenAI mock implementation to reflect API changes
MrOrz Jan 15, 2025
ac21df7
test: Fix circular reference in CreateAIReply.js mock
MrOrz Jan 15, 2025
decb182
test: Fix formatting in CreateAIReply.js mock implementation
MrOrz Jan 15, 2025
252a454
feat(openai): add Rollbar environment tags to OpenAI observer
MrOrz Jan 15, 2025
3bd6d21
fix(CreateAIReply): fix openai.chat.completions.create return value p…
MrOrz Jan 16, 2025
624b169
refactor: Simplify OpenAI response fixture structure
MrOrz Jan 16, 2025
82556bd
docs: Add JSDoc type annotation for SUCCESS_OPENAI_RESP
MrOrz Jan 16, 2025
26dcfe5
fix: Update OpenAI type import path for better type recognition
MrOrz Jan 16, 2025
c260036
fix: rename LANGFUSE_HOST to LANGFUSE_BASEURL
MrOrz Jan 16, 2025
b7f435f
refactor: Rename openai to getOpenAI and update function usage
MrOrz Jan 16, 2025
9ce0377
refactor: Improve OpenAI client initialization with cleaner arrow fun…
MrOrz Jan 16, 2025
db5b436
refactor: Rename openai function to getOpenAI and update call sites
MrOrz Jan 16, 2025
72157b7
refactor: Update OpenAI import and add comment for future improvements
MrOrz Jan 16, 2025
aaac72b
Based on the changes, I'll generate a concise commit message:
MrOrz Jan 16, 2025
c94e703
refactor: Update OpenAI mock to return function in test file
MrOrz Jan 16, 2025
5c4b347
test: Update CreateAIReply test to handle OpenAI API error case
MrOrz Jan 16, 2025
08cfeba
refactor: Remove empty object parameter from getOpenAI() calls
MrOrz Jan 16, 2025
109c2a1
fix: Update OpenAI mock function call in CreateAIReply test
MrOrz Jan 16, 2025
e1301af
refactor: Remove empty {} from getOpenAI() calls
MrOrz Jan 16, 2025
3df8e61
refactor: Improve OpenAI API call formatting and error handling
MrOrz Jan 16, 2025
70d1351
refactor: Use object destructuring for createAIResponse return value
MrOrz Jan 16, 2025
5b90b2c
feat: Add getAIResponseId method to createAIResponse utility
MrOrz Jan 16, 2025
6fd704d
refactor: Add JSDoc comment placeholder for AI response methods
MrOrz Jan 16, 2025
cedc8bc
docs: Add JSDoc comments for update and getAIResponseId methods
MrOrz Jan 16, 2025
74d2962
feat: Add tracing support for AI responses with traceId and traceName
MrOrz Jan 16, 2025
6627c2f
fix: Shorten traceName format in createTranscript
MrOrz Jan 17, 2025
36a39a6
test: Add .only to single test case for CreateAIReply mutation
MrOrz Jan 18, 2025
8fd2ea3
feat: Fix shared mock function for OpenAI in CreateAIReply test
MrOrz Jan 18, 2025
61a3497
test: Remove .only from CreateAIReply test case
MrOrz Jan 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,12 @@ GCS_BUCKET_NAME=
GCS_MEDIA_FOLDER=media/

# Open AI API key for AI replies, etc.
#
OPENAI_API_KEY=
OPENAI_API_KEY=sk-...

# Langfuse configuration
LANGFUSE_PUBLIC_KEY=pk-lf-...
LANGFUSE_SECRET_KEY=sk-lf-...
LANGFUSE_HOST=https://langfuse.cofacts.tw # Optional, for self-hosted

# When LOG_REQUESTS exists, it also shows incoming GraphQL operation, variables, and resolved user info
LOG_REQUESTS=
Expand Down
Loading
Loading