chore: import upstream snapshot with attribution
tools_continuous_delivery / Private PyPI non-main branch release (push) Has been skipped
tools_continuous_delivery / Private PyPI main branch release (push) Failing after 2m42s
Publish Promptflow Doc / Build (push) Has been cancelled
Publish Promptflow Doc / Deploy (push) Has been cancelled
Flake8 Lint / flake8 (push) Has been cancelled
Spell check CI / Spell_Check (push) Has been cancelled
tools_continuous_delivery / Private PyPI non-main branch release (push) Has been skipped
tools_continuous_delivery / Private PyPI main branch release (push) Failing after 2m42s
Publish Promptflow Doc / Build (push) Has been cancelled
Publish Promptflow Doc / Deploy (push) Has been cancelled
Flake8 Lint / flake8 (push) Has been cancelled
Spell check CI / Spell_Check (push) Has been cancelled
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
from promptflow.core import tool
|
||||
from promptflow.connections import AzureOpenAIConnection
|
||||
|
||||
|
||||
@tool
|
||||
def echo_connection(flow_input: str, node_input: str, connection: AzureOpenAIConnection):
|
||||
print(f"Flow input: {flow_input}")
|
||||
print(f"Node input: {node_input}")
|
||||
print(f"Flow connection: {connection._to_dict()}")
|
||||
# get from env var
|
||||
return {"value": flow_input}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
$schema: https://azuremlschemas.azureedge.net/promptflow/latest/Flow.schema.json
|
||||
inputs:
|
||||
flow_input:
|
||||
type: string
|
||||
outputs:
|
||||
output:
|
||||
type: object
|
||||
reference: ${echo_connection.output}
|
||||
nodes:
|
||||
- name: echo_connection
|
||||
type: python
|
||||
source:
|
||||
type: code
|
||||
path: echo_connection.py
|
||||
inputs:
|
||||
flow_input: ${inputs.flow_input}
|
||||
node_input: "dummy_node_input"
|
||||
connection: open_ai_connection
|
||||
Reference in New Issue
Block a user