Skip to content

Commit

Permalink
Put the examples in respective folders and add requirements.txt every…
Browse files Browse the repository at this point in the history
…where.
  • Loading branch information
madiator committed Dec 18, 2024
1 parent 5e8482a commit 88be182
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from typing import List
from pydantic import BaseModel, Field
"""Generate synthetic recipes for different cuisines."""

from bespokelabs import curator
from datasets import Dataset

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""Generate synthetic recipes for different cuisines.
Demonstrates how to use a structured output format with Litellm.
"""

from typing import List
from pydantic import BaseModel, Field
from bespokelabs import curator
Expand Down
1 change: 1 addition & 0 deletions examples/litellm-recipe-generation/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bespokelabs-curator
File renamed without changes.
1 change: 1 addition & 0 deletions examples/poem-generation/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bespokelabs-curator
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions examples/reannotation/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bespokelabs-curator
1 change: 1 addition & 0 deletions examples/ungrounded-qa/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bespokelabs-curator
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
"""Generate diverse set of questions and answers by generating diverse subjects and subsubjects.
This is similar to how data is generated for the Camel dataset.
See section F (appendix) of https://arxiv.org/pdf/2303.17760.
"""
from typing import List

from pydantic import BaseModel, Field
Expand All @@ -23,7 +28,7 @@ class QAs(BaseModel):


subject_prompter = curator.LLM(
prompt_func=lambda: f"Generate a diverse list of 3 subjects. Keep it high-level (e.g. Math, Science).",
prompt_func=lambda: "Generate a diverse list of 3 subjects. Keep it high-level (e.g. Math, Science).",
parse_func=lambda _, subjects: [subject for subject in subjects.subjects],
model_name="gpt-4o-mini",
response_format=Subjects,
Expand Down

0 comments on commit 88be182

Please sign in to comment.