return response_json[0]["generated_text"]
content_handler = ContentHandler()
chain = load_qa_chain(
    llm=SagemakerEndpoint(
        endpoint_name="endpoint-name", 
        credentials_profile_name="credentials-profile-name", 
        region_name="us-west-2", 
        model_kwargs={"temperature":1e-10},
        content_handler=content_handler
    ),
    prompt=PROMPT
)
chain({"input_documents": docs, "question": query}, return_only_outputs=True)
previous
PromptLayer OpenAI
next
Self-Hosted Models via Runhouse
By Harrison Chase
    
      © Copyright 2023, Harrison Chase.
      
  Last updated on Mar 22, 2023.