mjbuehler commited on
Commit
d3c5cbe
·
verified ·
1 Parent(s): d242b96

Update app.py

Browse files

reasoning_effort, revise

Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -33,7 +33,7 @@ def read_readme():
33
  INSTRUCTION_TEMPLATES = {
34
  ################# PODCAST ##################
35
  "podcast": {
36
- "intro": """Your task is to take the input text provided and turn it into an lively, engaging, informative podcast dialogue, in the style of NPR. The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or web pages.
37
 
38
  Don't worry about the formatting issues or any irrelevant information; your goal is to extract the key points, identify definitions, and interesting facts that could be discussed in a podcast.
39
 
@@ -542,15 +542,15 @@ def conditional_llm(model, api_base=None, api_key=None):
542
  If api_base is provided, it applies the @llm decorator with api_base.
543
  Otherwise, it applies the @llm decorator without api_base.
544
  """
545
- reasoning={
546
- "effort": "high",
547
- "summary": "auto"
548
- },
549
  def decorator(func):
550
  if api_base:
551
- return llm(model=model, api_base=api_base, reasoning=reasoning)(func)
552
  else:
553
- return llm(model=model, api_key=api_key, reasoning=reasoning)(func)
554
  return decorator
555
 
556
  def generate_audio(
 
33
  INSTRUCTION_TEMPLATES = {
34
  ################# PODCAST ##################
35
  "podcast": {
36
+ "intro": """Your task is to take the input text provided and turn it into an lively, engaging, informative podcast dialogue, in the style of NPR. Do not use or make up names. The input text may be messy or unstructured, as it could come from a variety of sources like PDFs or web pages.
37
 
38
  Don't worry about the formatting issues or any irrelevant information; your goal is to extract the key points, identify definitions, and interesting facts that could be discussed in a podcast.
39
 
 
542
  If api_base is provided, it applies the @llm decorator with api_base.
543
  Otherwise, it applies the @llm decorator without api_base.
544
  """
545
+
546
+ #for o-x reasoning models (o1, o3, o4, ...)
547
+ reasoning_effort="high"
548
+
549
  def decorator(func):
550
  if api_base:
551
+ return llm(model=model, api_base=api_base, reasoning_effort=reasoning_effort)(func)
552
  else:
553
+ return llm(model=model, api_key=api_key, reasoning_effort=reasoning_effort)(func)
554
  return decorator
555
 
556
  def generate_audio(