docs: update integration api refs (#25195)

- [x] toolkits
- [x] retrievers (in this repo)
This commit is contained in:
ccurme
2024-08-09 08:27:32 -04:00
committed by GitHub
parent 91ea4b7449
commit 3b7437d184
11 changed files with 675 additions and 21 deletions

View File

@@ -44,7 +44,7 @@ class __ModuleName__Retriever(BaseRetriever):
retriever.invoke(query)
.. code-block:: python
.. code-block:: none
# TODO: Example output.
@@ -67,7 +67,7 @@ class __ModuleName__Retriever(BaseRetriever):
llm = ChatOpenAI(model="gpt-3.5-turbo-0125")
def format_docs(docs):
return "\n\n".join(doc.page_content for doc in docs)
return "\\n\\n".join(doc.page_content for doc in docs)
chain = (
{"context": retriever | format_docs, "question": RunnablePassthrough()}
@@ -78,7 +78,7 @@ class __ModuleName__Retriever(BaseRetriever):
chain.invoke("...")
.. code-block:: python
.. code-block:: none
# TODO: Example output.

View File

@@ -41,7 +41,7 @@ class __ModuleName__Toolkit(BaseToolKit):
toolkit.get_tools()
.. code-block:: python
.. code-block:: none
# TODO: Example output.
@@ -61,7 +61,7 @@ class __ModuleName__Toolkit(BaseToolKit):
for event in events:
event["messages"][-1].pretty_print()
.. code-block:: python
.. code-block:: none
# TODO: Example output.