InvalidRequestError: Unrecognized request argument supplied: functions #8070
Replies: 2 comments
-
🤖 Hello, The error message "Unrecognized request argument supplied: functions" suggests that the OpenAI API is receiving an unexpected argument named "functions". In the context of the LlamaIndex framework, the If you are receiving an "Unrecognized request argument supplied: functions" error, it suggests that you are trying to include a "functions" argument in your Please check your code for any incorrect usage of the "functions" argument. If you are trying to use function calling, you should be using the "function_call" argument instead, as shown in the provided test cases. Also, ensure that the model you are using supports function calling. The You can refer to the following sources for more information: If you continue to face issues, please provide more details about the context in which you're using the "functions" argument, and I'll be happy to help further. Best, Sources
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. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
@Manikanta5112 you likely need to use a newer API version for azure, functions were added extremely recently |
Beta Was this translation helpful? Give feedback.
-
I've supplied the Azure
from llama_index.llms import AzureOpenAI
llama_idx_llm = AzureOpenAI(
deployment_name=deployment_name
)
from llama_index.node_parser import (
UnstructuredElementNodeParser,
)
node_parser = UnstructuredElementNodeParser(llm=llama_idx_llm)
whenever I am running below code
import os
import pickle
if not os.path.exists("2021_nodes.pkl"):
raw_nodes_2021 = node_parser.get_nodes_from_documents(docs_2021)
pickle.dump(raw_nodes_2021, open("2021_nodes.pkl", "wb"))
else:
raw_nodes_2021 = pickle.load(open("2021_nodes.pkl", "rb"))
getting error: InvalidRequestError: Unrecognized request argument supplied: functions
Beta Was this translation helpful? Give feedback.
All reactions