mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-06 22:12:12 +02:00
fix typo
This commit is contained in:
parent
ed4ec5ce67
commit
cfb62ff73b
4 changed files with 6 additions and 15 deletions
|
|
@ -29,7 +29,6 @@ async def create_podcast_transcript(
|
||||||
configuration = Configuration.from_runnable_config(config)
|
configuration = Configuration.from_runnable_config(config)
|
||||||
user_id = configuration.user_id
|
user_id = configuration.user_id
|
||||||
search_space_id = configuration.search_space_id
|
search_space_id = configuration.search_space_id
|
||||||
podcast_title = configuration.podcast_title
|
|
||||||
|
|
||||||
# Get user's long context LLM
|
# Get user's long context LLM
|
||||||
llm = await get_user_long_context_llm(state.db_session, user_id, search_space_id)
|
llm = await get_user_long_context_llm(state.db_session, user_id, search_space_id)
|
||||||
|
|
@ -38,8 +37,8 @@ async def create_podcast_transcript(
|
||||||
print(error_message)
|
print(error_message)
|
||||||
raise RuntimeError(error_message)
|
raise RuntimeError(error_message)
|
||||||
|
|
||||||
# Get the prompt with podcast_title as user_prompt
|
# Get the prompt
|
||||||
prompt = get_podcast_generation_prompt(user_prompt=podcast_title)
|
prompt = get_podcast_generation_prompt()
|
||||||
|
|
||||||
# Create the messages
|
# Create the messages
|
||||||
messages = [
|
messages = [
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,11 @@
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
|
|
||||||
def get_podcast_generation_prompt(user_prompt: str | None = None):
|
def get_podcast_generation_prompt():
|
||||||
user_prompt_section = ""
|
|
||||||
if user_prompt:
|
|
||||||
user_prompt_section = f"""
|
|
||||||
<user_instructions>
|
|
||||||
{user_prompt}
|
|
||||||
</user_instructions>
|
|
||||||
"""
|
|
||||||
|
|
||||||
return f"""
|
return f"""
|
||||||
Today's date: {datetime.datetime.now().strftime("%Y-%m-%d")}
|
Today's date: {datetime.datetime.now().strftime("%Y-%m-%d")}
|
||||||
<podcast_generation_system>
|
<podcast_generation_system>
|
||||||
You are a master podcast scriptwriter, adept at transforming diverse input content into a lively, engaging, and natural-sounding conversation between two distinct podcast hosts. Your primary objective is to craft authentic, flowing dialogue that captures the spontaneity and chemistry of a real podcast discussion, completely avoiding any hint of robotic scripting or stiff formality. Think dynamic interplay, not just information delivery.{user_prompt_section}
|
You are a master podcast scriptwriter, adept at transforming diverse input content into a lively, engaging, and natural-sounding conversation between two distinct podcast hosts. Your primary objective is to craft authentic, flowing dialogue that captures the spontaneity and chemistry of a real podcast discussion, completely avoiding any hint of robotic scripting or stiff formality. Think dynamic interplay, not just information delivery.
|
||||||
|
|
||||||
<input>
|
<input>
|
||||||
- '<source_content>': A block of text containing the information to be discussed in the podcast. This could be research findings, an article summary, a detailed outline, user chat history related to the topic, or any other relevant raw information. The content might be unstructured but serves as the factual basis for the podcast dialogue.
|
- '<source_content>': A block of text containing the information to be discussed in the podcast. This could be research findings, an article summary, a detailed outline, user chat history related to the topic, or any other relevant raw information. The content might be unstructured but serves as the factual basis for the podcast dialogue.
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ def generate_chat_podcast_task(
|
||||||
Args:
|
Args:
|
||||||
chat_id: ID of the chat to generate podcast from
|
chat_id: ID of the chat to generate podcast from
|
||||||
search_space_id: ID of the search space
|
search_space_id: ID of the search space
|
||||||
podcast_title: Title for the podcast (used as user prompt for generation)
|
podcast_title: Title for the podcast
|
||||||
user_id: ID of the user
|
user_id: ID of the user
|
||||||
"""
|
"""
|
||||||
loop = asyncio.new_event_loop()
|
loop = asyncio.new_event_loop()
|
||||||
|
|
|
||||||
|
|
@ -96,7 +96,7 @@ async def generate_chat_podcast(
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
"configurable": {
|
"configurable": {
|
||||||
"podcast_title": podcast_title,
|
"podcast_title": "SurfSense",
|
||||||
"user_id": str(user_id),
|
"user_id": str(user_id),
|
||||||
"search_space_id": search_space_id,
|
"search_space_id": search_space_id,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue