pixie-examples 0.1.1.dev16__tar.gz → 0.1.1.dev17__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/PKG-INFO +1 -1
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/sleepy_poet.py +14 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/pyproject.toml +1 -1
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/LICENSE +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/README.md +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/__init__.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/README.md +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/__init__.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/basic_agent.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/customer_support.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/personal_assistant.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/sql_agent.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langgraph/__init__.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langgraph/langgraph_rag.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langgraph/langgraph_sql_agent.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/README.md +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/__init__.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/customer_service.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/financial_research_agent.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/llm_as_a_judge.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/routing.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/.env.example +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/README.md +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/__init__.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/bank_support.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/flight_booking.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/question_graph.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/sql_gen.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/structured_output.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/__init__.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/chatbot.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/problem_solver.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/weather_agent.py +0 -0
- {pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/sql_utils.py +0 -0
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/sleepy_poet.py
RENAMED
|
@@ -75,12 +75,22 @@ async def example_sleepy_poet() -> pixie.PixieGenerator[str, HaikuRequest]:
|
|
|
75
75
|
yield "What's your request?"
|
|
76
76
|
config = yield pixie.InputRequired(HaikuRequest)
|
|
77
77
|
|
|
78
|
+
ack = asyncio.Event()
|
|
79
|
+
haiku_writen = False
|
|
80
|
+
|
|
78
81
|
async def write_haikus():
|
|
79
82
|
for i in range(0, config.count):
|
|
83
|
+
print("writing haiku", i + 1)
|
|
80
84
|
result = await poet.run(config.topic, deps=deps)
|
|
81
85
|
await q.put(f"### Haiku #{i+1}\n{result.output}\n")
|
|
82
86
|
deps.time_to_write = False # Reset for next haiku
|
|
83
87
|
|
|
88
|
+
nonlocal haiku_writen
|
|
89
|
+
haiku_writen = True # let consumer know a kaiku was written
|
|
90
|
+
|
|
91
|
+
await ack.wait() # Wait for acknowledgment before next haiku
|
|
92
|
+
ack.clear()
|
|
93
|
+
|
|
84
94
|
await q.put(None) # Signal completion
|
|
85
95
|
|
|
86
96
|
task = asyncio.create_task(write_haikus())
|
|
@@ -89,7 +99,11 @@ async def example_sleepy_poet() -> pixie.PixieGenerator[str, HaikuRequest]:
|
|
|
89
99
|
update = await q.get()
|
|
90
100
|
if update is None:
|
|
91
101
|
break
|
|
102
|
+
print(update)
|
|
92
103
|
yield update
|
|
104
|
+
if haiku_writen: # acknowledge after receiving a writen haiku
|
|
105
|
+
haiku_writen = False
|
|
106
|
+
ack.set() # send acknowledgment to writer so it can proceed
|
|
93
107
|
|
|
94
108
|
except asyncio.CancelledError:
|
|
95
109
|
task.cancel()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/customer_support.py
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langchain/personal_assistant.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langgraph/langgraph_rag.py
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/langgraph/langgraph_sql_agent.py
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/README.md
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/openai_agents_sdk/routing.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/bank_support.py
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/flight_booking.py
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/question_graph.py
RENAMED
|
File without changes
|
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/pydantic_ai/structured_output.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/problem_solver.py
RENAMED
|
File without changes
|
{pixie_examples-0.1.1.dev16 → pixie_examples-0.1.1.dev17}/examples/quickstart/weather_agent.py
RENAMED
|
File without changes
|
|
File without changes
|