356 matches across 25 files for TODO lang:Python lang:Python lang:Python
snippet_mode: auto · sorted by relevance
.github/scripts/check_diff.py PYTHON 2 matches view file →
333 dirs_to_run["extended-test"].add(dir_)
334 elif file.startswith("libs/standard-tests"):
335 # TODO: update to include all packages that rely on standard-tests (all partner packages)
336 # Note: won't run on external repo partners
337 dirs_to_run["lint"].add("libs/standard-tests")
· · ·
379
380 # we now have dirs_by_job
381 # todo: clean this up
382 map_job_to_configs = {
383 job: _get_configs_for_multi_dirs(job, dirs_to_run, dependents)
libs/core/langchain_core/utils/_merge.py PYTHON 2 matches view file →
44 raise TypeError(msg)
45 elif isinstance(merged[right_k], str):
46 # TODO: Add below special handling for 'type' key in 0.3 and remove
47 # merge_lists 'type' logic.
48 #
· · ·
129 ]
130 if to_merge:
131 # TODO: Remove this once merge_dict is updated with special
132 # handling for 'type'.
133 if (left_type := merged[to_merge[0]].get("type")) and (
libs/core/langchain_core/messages/content.py PYTHON 5 matches view file →
274 call result in events when multiple concurrent tool calls are made.
275 """
276 # TODO: Consider making this NotRequired[str] in the future.
277
278 name: str
· · ·
308 """
309
310 # TODO: Consider making fields NotRequired[str] in the future.
311
312 type: Literal["tool_call_chunk"]
· · ·
319 call result in events when multiple concurrent tool calls are made.
320 """
321 # TODO: Consider making this NotRequired[str] in the future.
322
323 name: str | None
· · ·
341 """
342
343 # TODO: Consider making fields NotRequired[str] in the future.
344
345 type: Literal["invalid_tool_call"]
· · ·
352 call result in events when multiple concurrent tool calls are made.
353 """
354 # TODO: Consider making this NotRequired[str] in the future.
355
356 name: str | None
libs/langchain_v1/langchain/agents/middleware/todo.py PYTHON 73 matches · showing 5 view file →
23
24
25class Todo(TypedDict):
26 """A single todo item with content and status."""
27
· · ·
26 """A single todo item with content and status."""
27
28 content: str
· · ·
29 """The content/description of the todo item."""
30
31 status: Literal["pending", "in_progress", "completed"]
· · ·
32 """The current status of the todo item."""
33
34
· · ·
35class PlanningState(AgentState[ResponseT]):
36 """State schema for the todo middleware.
37
38 Type Parameters:
+ 68 more matches in this file
libs/partners/mistralai/langchain_mistralai/chat_models.py PYTHON 3 matches view file →
662 api_key_str = self.mistral_api_key
663
664 # TODO: handle retries
665 base_url_str = (
666 self.endpoint
· · ·
680 verify=global_ssl_context,
681 )
682 # TODO: handle retries and max_concurrency
683 if not self.async_client:
684 self.async_client = httpx.AsyncClient(
· · ·
1141 )
1142 raise ValueError(msg)
1143 # TODO: Update to pass in tool name as tool_choice if/when Mistral supports
1144 # specifying a tool.
1145 llm = self.bind_tools(
libs/partners/mistralai/langchain_mistralai/embeddings.py PYTHON 2 matches view file →
179 """Validate configuration."""
180 api_key_str = self.mistral_api_key.get_secret_value()
181 # TODO: handle retries
182 if not self.client:
183 self.client = httpx.Client(
· · ·
190 timeout=self.timeout,
191 )
192 # TODO: handle retries and max_concurrency
193 if not self.async_client:
194 self.async_client = httpx.AsyncClient(
libs/core/langchain_core/language_models/llms.py PYTHON 2 matches view file →
827 prompts,
828 stop=stop,
829 # TODO: support multiple run managers
830 run_manager=run_managers[0] if run_managers else None,
831 **kwargs,
· · ·
1538 **kwargs: Any,
1539 ) -> LLMResult:
1540 # TODO: add caching here.
1541 generations = []
1542 new_arg_supported = inspect.signature(self._call).parameters.get("run_manager")
libs/core/langchain_core/output_parsers/openai_tools.py PYTHON 1 matches view file →
310 """The tools to parse."""
311
312 # TODO: Support more granular streaming of objects.
313 # Currently only streams once all Pydantic object fields are present.
314 def parse_result(self, result: list[Generation], *, partial: bool = False) -> Any:
libs/langchain/langchain_classic/smith/evaluation/string_run_evaluator.py PYTHON 2 matches view file →
323 )
324 if RUN_KEY in output:
325 # TODO: Not currently surfaced. Update
326 evaluation_result.evaluator_info[RUN_KEY] = output[RUN_KEY]
327 return {"feedback": evaluation_result}
· · ·
381 key=self.string_evaluator.evaluation_name,
382 comment=f"Error evaluating run {run.id}: {e}",
383 # TODO: Add run ID once we can declare it via callbacks
384 )
385
libs/langchain/langchain_classic/chains/openai_functions/openapi.py PYTHON 1 matches view file →
149 )
150 request_body = spec.get_request_body_for_operation(op)
151 # TODO: Support more MIME types.
152 if request_body and request_body.content:
153 media_types = {}
libs/partners/huggingface/langchain_huggingface/llms/huggingface_pipeline.py PYTHON 1 matches view file →
163 raise ImportError(err_msg)
164
165 # TODO: upgrade _MIN_OPTIMUM_VERSION to 1.22 after release
166 min_optimum_version = (
167 "1.22"
libs/core/langchain_core/language_models/model_profile.py PYTHON 4 matches view file →
57 image_inputs: bool
58 """Whether image inputs are supported."""
59 # TODO: add more detail about formats?
60
61 image_url_inputs: bool
· · ·
66 """Whether [PDF inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
67 are supported."""
68 # TODO: add more detail about formats? e.g. bytes or base64
69
70 audio_inputs: bool
· · ·
71 """Whether [audio inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
72 are supported."""
73 # TODO: add more detail about formats? e.g. bytes or base64
74
75 video_inputs: bool
· · ·
76 """Whether [video inputs](https://docs.langchain.com/oss/python/langchain/models#multimodal)
77 are supported."""
78 # TODO: add more detail about formats? e.g. bytes or base64
79
80 image_tool_message: bool
libs/langchain/langchain_classic/chains/natbot/crawler.py PYTHON 1 matches view file →
305 try:
306 cursor = layout_node_index.index(index)
307 # TODO: replace this with proper cursoring, ignoring the fact this is
308 # O(n^2) for the moment
309 except ValueError:
libs/langchain/langchain_classic/retrievers/time_weighted_retriever.py PYTHON 2 matches view file →
31 """Keyword arguments to pass to the `VectorStore` similarity search."""
32
33 # TODO: abstract as a queue
34 memory_stream: list[Document] = Field(default_factory=list)
35 """The memory_stream of documents to search through."""
· · ·
126 # Ensure frequently accessed memories aren't forgotten
127 for doc, _ in rescored_docs[: self.k]:
128 # TODO: Update vector store doc once `update` method is exposed.
129 buffered_doc = self.memory_stream[doc.metadata["buffer_idx"]]
130 buffered_doc.metadata["last_accessed_at"] = current_time
libs/core/langchain_core/prompts/string.py PYTHON 1 matches view file →
376 A pretty representation of the prompt.
377 """
378 # TODO: handle partials
379 dummy_vars = {
380 input_var: "{" + f"{input_var}" + "}" for input_var in self.input_variables
libs/langchain/langchain_classic/chains/question_answering/chain.py PYTHON 2 matches view file →
89 callbacks=callbacks,
90 )
91 # TODO: document prompt
92 return StuffDocumentsChain(
93 llm_chain=llm_chain,
· · ·
137 callbacks=callbacks,
138 )
139 # TODO: document prompt
140 combine_documents_chain = StuffDocumentsChain(
141 llm_chain=reduce_chain,
libs/core/langchain_core/messages/block_translators/bedrock.py PYTHON 1 matches view file →
88 The derived content blocks.
89 """
90 # TODO: add model_name to all Bedrock chunks and update core merging logic
91 # to not append during aggregation. Then raise NotImplementedError here if
92 # not an Anthropic model to fall back to best-effort parsing.
libs/partners/anthropic/langchain_anthropic/_client_utils.py PYTHON 1 matches view file →
38 if self.is_closed:
39 return
40 # TODO(someday): support non asyncio runtimes here
41 asyncio.get_running_loop().create_task(self.aclose())
42 except Exception: # noqa: S110
libs/core/langchain_core/utils/mustache.py PYTHON 1 matches view file →
630 # Gather up all the tags inside the section
631 # (And don't be tricked by nested end tags with the same key)
632 # TODO: This feels like it still has edge cases, no?
633 tags = []
634 tags_with_same_key = 0
libs/core/langchain_core/vectorstores/in_memory.py PYTHON 1 matches view file →
165 embedding: embedding function to use.
166 """
167 # TODO: would be nice to change to
168 # dict[str, Document] at some point (will be a breaking change)
169 self.store: dict[str, dict[str, Any]] = {}
libs/core/langchain_core/prompts/chat.py PYTHON 3 matches view file →
346 Human-readable representation.
347 """
348 # TODO: Handle partials
349 title = self.__class__.__name__.replace("MessagePromptTemplate", " Message")
350 title = get_msg_title_repr(title, bold=html)
· · ·
654 Human-readable representation.
655 """
656 # TODO: Handle partials
657 title = self.__class__.__name__.replace("MessagePromptTemplate", " Message")
658 title = get_msg_title_repr(title, bold=html)
· · ·
1331 Human-readable representation.
1332 """
1333 # TODO: handle partials
1334 return "\n\n".join(msg.pretty_repr(html=html) for msg in self.messages)
1335
libs/partners/exa/langchain_exa/tools.py PYTHON 1 matches view file →
120 run_manager: CallbackManagerForToolRun | None = None,
121 ) -> list[dict] | str:
122 # TODO: rename `type` to something else, as it is a reserved keyword
123 """Use the tool.
124
libs/core/langchain_core/messages/ai.py PYTHON 1 matches view file →
299 return blocks
300
301 # TODO: remove this logic if possible, reducing breaking nature of changes
302 @model_validator(mode="before")
303 @classmethod
libs/langchain/langchain_classic/agents/initialize.py PYTHON 1 matches view file →
101 )
102 with contextlib.suppress(NotImplementedError):
103 # TODO: Add tags from the serialized object directly.
104 tags_.append(agent_obj._agent_type) # noqa: SLF001
105 else:
libs/core/langchain_core/messages/block_translators/openai.py PYTHON 1 matches view file →
601 return document_citation
602
603 # TODO: standardise container_file_citation?
604 non_standard_annotation: types.NonStandardAnnotation = {
605 "type": "non_standard_annotation",
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.