mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-15 06:26:12 +00:00
Fixed missing optional tags. Added default key value for Ollama (#12599)
Added missing Optional typings. Added default values for Ollama optional keys. --------- Co-authored-by: Bagatur <baskaryan@gmail.com>
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
from typing import Optional
|
||||
|
||||
FULL_PROMPT = """# Context
|
||||
- Plate-based data is rectangular and could be situated anywhere within the dataset.
|
||||
- The first item in every row is the row index
|
||||
@@ -54,7 +56,11 @@ AI_REPONSE_DICT = {
|
||||
}
|
||||
|
||||
|
||||
def create_prompt(num_plates: int | None, num_rows: int | None, num_cols: int | None):
|
||||
def create_prompt(
|
||||
num_plates: Optional[int] = None,
|
||||
num_rows: Optional[int] = None,
|
||||
num_cols: Optional[int] = None,
|
||||
) -> str:
|
||||
additional_prompts = []
|
||||
if num_plates:
|
||||
num_plates_str = f"are {num_plates} plates" if num_plates > 1 else "is 1 plate"
|
||||
|
Reference in New Issue
Block a user