Parlyr
Conversational NLP - natural language to extraction plans
1 min read
Parlyr converts natural language into extraction plans and supports interactive chat sessions.
parse
result = client.parlyr.parse(
"Extract all product names, prices, and ratings",
url="https://example.com/products",
)
print(result.intent, result.schema, result.confidence)
chat
response = client.parlyr.chat(
session_id=None,
message="Find all prices on this page",
url="https://example.com",
)
print(response.answer, response.session_id)
chatStream (SSE)
for event in client.parlyr.chat_stream(session_id="sess-abc", message="Refine"):
print(event.type, event.delta)
for await (const event of client.parlyr.chatStream({ sessionId: 'sess-abc', message: 'Refine' })) {
process.stdout.write(event.delta ?? '');
}
delete_session
client.parlyr.delete_session("sess-abc123")
Was this page helpful?