Skip to content

Move student snapshot prompts into langfuse#74015

Open
lfryemason wants to merge 2 commits into
stagingfrom
lc/snap-langfuse
Open

Move student snapshot prompts into langfuse#74015
lfryemason wants to merge 2 commits into
stagingfrom
lc/snap-langfuse

Conversation

@lfryemason

Copy link
Copy Markdown
Contributor

No description provided.

fetch_prompt still called the removed `client` method after it was
split into tutor_client/ta_client, raising NoMethodError.

def self.fetch_prompt(prompt_name)
response = client.fetch_prompt(prompt_name)
response = tutor_client.fetch_prompt(prompt_name)

@lfryemason lfryemason Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This called client, which no longer exists — it was split into tutor_client/ta_client in 3243f04 (#71176), which updated add_dataset_item accordingly but missed this method. Any call to fetch_prompt was raising NoMethodError. Switched to tutor_client since prompt fetching is a tutor-side concern, matching tutor_add_dataset_item below it.

Issue found and comment made by claude

Replace the hardcoded lesson-insight/lesson-feedback system prompts with
{{variable}}-substitution templates fetched from Langfuse (ta_client),
falling back to local constants if the fetch fails. Also add
LangfuseHelper.fetch_ta_prompt and extract the shared response-wrapping
logic out of fetch_tutor_prompt/tutor_add_dataset_item.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant