Skip to content

Commit

Permalink
Fix Google Colab Demo (onyx-dot-app#275)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuhongsun96 authored Aug 9, 2023
1 parent 89f71ac commit a03818e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion backend/danswer/direct_qa/request_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def send_model_request(
}

data = {
"input": filled_prompt,
"inputs": filled_prompt,
"parameters": {
"temperature": 0.0,
"max_tokens": max_output_tokens,
Expand Down Expand Up @@ -212,6 +212,10 @@ def __init__(
self.model_class = get_host_specific_model_class(model_host_type)
self.timeout = timeout

@property
def requires_api_key(self) -> bool:
return self.model_class.requires_api_key

def _get_request_response(
self, query: str, context_docs: list[InferenceChunk], stream: bool
) -> Response:
Expand Down

0 comments on commit a03818e

Please sign in to comment.