llama_index [一条(),意思意思:{:{

t0ybt7op  于 1个月前  发布在  其他
关注(0)|答案(1)|浏览(29)

功能描述

根据谷歌,他们的Gemini模型具有函数调用功能。在LlamaIndex中,这被设置为False。
Gemini链接:https://ai.google.dev/gemini-api/docs/function-calling
LlamaIndex代码:

from llama_index.llms.gemini import Gemini

llm = Gemini(model = "models/gemini-1.5-pro-latest")
llm.metadata

这段代码会打印出单元格:

LLMMetadata(context_window=2105344, num_output=8192, is_chat_model=True, is_function_calling_model=False, model_name='models/gemini-1.5-pro-latest', system_role=<MessageRole.SYSTEM: 'system'>)

原因

功能的值

目前Gemini是免费的(但有速率限制),因此具有函数调用功能对于快速原型设计非常有帮助。

kpbwa7wx

kpbwa7wx1#

我欢迎对此做出贡献!我曾经查看过,坦白说,发现Geminis API的实现方式与llama-index的要求非常令人困惑。

Vertexai在llama-indexx中支持函数调用(因此,如果您正在使用Vertexai,可以通过这种方式访问Gemini)。

相关问题