Skip to content

Instantly share code, notes, and snippets.

@john-adeojo
Created August 8, 2023 11:05
Show Gist options
  • Save john-adeojo/055bc4b80759d025eca2dedd5f03f428 to your computer and use it in GitHub Desktop.
Save john-adeojo/055bc4b80759d025eca2dedd5f03f428 to your computer and use it in GitHub Desktop.
from haystack import Pipeline
from function_call import OpenAIFunctionCall
def create_pipeline(retriever, API_KEY):
p = Pipeline()
p.add_node(component=retriever, name="retriever", inputs=["Query"])
p.add_node(component=OpenAIFunctionCall(API_KEY), name="OpenAIFunctionCall", inputs=["retriever"])
return p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment