Comments (8)
To address your query about enabling function calling for "anthropic.claude-v2" and "anthropic.claude-3-sonnet-20240229-v1:0" or finding alternative models that support such functionality for implementing a multi-document agent architecture, it's essential to ensure model compatibility with the function calling API. The FunctionCallingAgent
class from LlamaIndex provides a framework for this, but your specified models must be compatible or adapted to fit this framework.
-
Model Compatibility: First, verify if your chosen models can integrate with the
FunctionCallingAgent
. This step is crucial for enabling function calling capabilities. -
Adapting Models: If the models do not support function calling out of the box, you may need to adapt them to work with the
FunctionCallingAgent
framework. This could involve wrapping your models to fit the expected interface for function calling. -
Configuring
FunctionCallingAgent
: Utilize theFunctionCallingAgent
by setting up its parameters to customize how your LLM interacts with tools and manages tool calls based on the chat context and user messages. -
Integration with
ReActAgentWorker
: While not explicitly addressed, the principles of theFunctionCallingAgent
can be adapted to work within a structured planner agent setup, potentially involving customization to fit the structured planning and execution flow ofReActAgentWorker
. -
Error Handling and Parallel Calls Management: Implement logic for error handling and managing parallel tool calls effectively, based on the capabilities of your chosen LLMs and the requirements of your application.
For detailed implementation and further guidance, refer to the LlamaIndex documentation and source code, specifically the sections related to the FunctionCallingAgent
class and its integration with agent workers. This approach will ensure a seamless operation of your multi-document agent architecture within the constraints and capabilities of the Bedrock LLMs you wish to use.
Details
Sources
- llama-index-core/llama_index/core/agent/function_calling/step.py
- llama-index-core/llama_index/core/llms/function_calling.py
- llama-index-core/llama_index/core/agent/function_calling/base.py
- llama-index-integrations/llms/llama-index-llms-bedrock/llama_index/llms/bedrock/utils.py
- llama-index-integrations/llms/llama-index-llms-anthropic/llama_index/llms/anthropic/base.py
- llama-index-core/tests/agent/runner/test_planner.py
- llama-index-core/llama_index/core/program/function_program.py
- llama-index-integrations/agent/llama-index-agent-openai/llama_index/agent/openai/step.py
- llama-index-packs/llama-index-packs-agents-llm-compiler/llama_index/packs/agents_llm_compiler/step.py
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
from llama_index.
You need to use the ReactAgentWorker
, since the bedrock LLM class doesn't implement the FunctionCallingLLM
class
from llama_index.
from llama_index.core.agent import (
StructuredPlannerAgent,
ReActAgentWorker,
)
# create the react agent worker for reasoning
worker = ReActAgentWorker.from_tools(
[lyft_tool, uber_tool], verbose=True
)
# wrap the worker in the top-level planner
agent = StructuredPlannerAgent(
worker, tools=[lyft_tool, uber_tool], verbose=True
)
from llama_index.
Hey @noviljohnson! 😄 Long time no type, huh? I hope you've been doing great since our last chat. 🚀 Let me dive into your query about multi document agents and bedrock llms, and I'll get back to you with some insights in a jiffy!
from llama_index.
Hi @logan-markewich,
thank you
it worked with ReactAgentWorker
.
but i am getting response sometimes in English and sometimes in different language (maybe French/ Latin/Spanish 😂)
could you tell me why this is happening. Or should i change anything.
This is the output i got
El documento propone Quantized Low Rank Adapters (QLORA) como un método eficiente para ajustar modelos de lenguaje grandes cuantizados (LLM) para tareas específicas. QLORA agrega un pequeño número de parámetros específicos de la tarea a un LLM cuantizado en forma de adaptadores de rango bajo. Esto permite un ajuste eficiente sin volver a entrenar o cambiar el modelo base. Cuantizar los adaptadores hace que la inferencia sea muy rápida y eficiente en memoria en comparación con los adaptadores de precisión completa. Los experimentos muestran que QLOR
But in thought/action plan printing statements i see English
Answer: Based on the summary from the reinforcement_learning tool, some key points of the paper on a standardized reinforcement learning framework for AAM contingency management are:
It proposes using reinforcement learning and an MDP formulation for real-time decision making and contingency management in AAM.
The MDP is integrated into the AAM-Gym simulation framework to enable rapid prototyping and benchmarking of algorithms.
This provides a way to evaluate existing systems and enables future research on RL algorithms for AAM contingency management.
The paper includes baseline results and metrics using the framework to demonstrate its capabilities.
thanks😊
from llama_index.
hi,
after experimenting for some time, now i am getting all responses in English.
But it is taking 1.5 to 2 min to return the response. Is this normal response time?.
Is there a way to reduce the response time.
Thank you.
from llama_index.
The response time depends on the LLM being used, how many LLM calls are being made, and how much text the LLM is writing.
Typically there is
1 LLM call to either call a tool or respond
1 tool call (which could involve 1+ LLM calls)
1 LLM call to either respond using the tool response or call another tool
and so on
from llama_index.
Thank you @logan-markewich
from llama_index.
Related Issues (20)
- [Question]: Can we apply the Retry Agent for the Query Time Sample Row Retrieval with chunk based indexing of tables. HOT 4
- [Feature Request]: Support Qwen-Long model in DashScope LLM
- [Bug]: ReacAgent System Prompt Template doesn't work good with some LLMs HOT 5
- [Question]: How to do a text-based RAG using AzureOpenAIMultiModal and gpt-4o HOT 4
- [Question]: LlamaIndex Multi-Document Agents HOT 2
- [Feature Request]: I want to use Langchain agents with llamaindex's index HOT 1
- [Bug]: I can't load a document's to ondemandloadertool to use it as a tool HOT 7
- [Bug]:Graph_RAG_LlamaIndex_Workshop | ImportError: cannot import name 'BaseCache' from 'langchain.cache' HOT 1
- [Bug]:Graph_RAG_LlamaIndex_Workshop | ImportError: cannot import name 'BaseCache' from 'langchain.cache' HOT 3
- [Bug]: OpenAILike Can't Parse Result HOT 4
- [Bug]: UnstructuredReader does not allow to load_data from uploaded files HOT 1
- [Bug]: Querying neo4j knowledge graph HOT 9
- [Bug]: Metadata filters not working with VectorIndexRetriever for Milvus HOT 3
- [Question]: PGVectorStore: how to implement text search on metadata? HOT 2
- [Bug]: Redundant calculation in the title extractor HOT 2
- [Bug]: Duplicate Callback Invocation in achat and chat Methods HOT 1
- [Bug]:<MilvusException:(code=1100,message=the length (79145) of dynamic field exceeds max length (65536): invalid parameter[expected=valid length dynamic field][actual=length exceeds max length HOT 4
- [Question]: sentence-spliter's randomness HOT 2
- Found duplicated primary key value Summer founders program, which violates the uniqueness constraint of the primary key column.[Bug]: HOT 1
- [Bug]: QueryTransformComponent is internally calling method `self._query_transform` which doesn't exist HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from llama_index.