mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-09 06:53:59 +00:00
infra: add -p to mkdir in lint steps (#17013)
Previously, if this did not find a mypy cache then it wouldnt run this makes it always run adding mypy ignore comments with existing uncaught issues to unblock other prs --------- Co-authored-by: Erick Friis <erick@langchain.dev> Co-authored-by: Bagatur <22008038+baskaryan@users.noreply.github.com>
This commit is contained in:
@@ -297,7 +297,7 @@ class _OllamaCommon(BaseLanguageModel):
|
||||
"Ollama call failed with status code 404."
|
||||
)
|
||||
else:
|
||||
optional_detail = await response.json().get("error")
|
||||
optional_detail = await response.json().get("error") # type: ignore[attr-defined]
|
||||
raise ValueError(
|
||||
f"Ollama call failed with status code {response.status}."
|
||||
f" Details: {optional_detail}"
|
||||
@@ -380,7 +380,7 @@ class Ollama(BaseLLM, _OllamaCommon):
|
||||
"""Return type of llm."""
|
||||
return "ollama-llm"
|
||||
|
||||
def _generate(
|
||||
def _generate( # type: ignore[override]
|
||||
self,
|
||||
prompts: List[str],
|
||||
stop: Optional[List[str]] = None,
|
||||
@@ -416,7 +416,7 @@ class Ollama(BaseLLM, _OllamaCommon):
|
||||
generations.append([final_chunk])
|
||||
return LLMResult(generations=generations)
|
||||
|
||||
async def _agenerate(
|
||||
async def _agenerate( # type: ignore[override]
|
||||
self,
|
||||
prompts: List[str],
|
||||
stop: Optional[List[str]] = None,
|
||||
@@ -445,7 +445,7 @@ class Ollama(BaseLLM, _OllamaCommon):
|
||||
prompt,
|
||||
stop=stop,
|
||||
images=images,
|
||||
run_manager=run_manager,
|
||||
run_manager=run_manager, # type: ignore[arg-type]
|
||||
verbose=self.verbose,
|
||||
**kwargs,
|
||||
)
|
||||
|
Reference in New Issue
Block a user