Skip to content

Python: AttributeError: 'Kernel' object has no attribute 'get_prompt_execution_settings_from_service' #5444

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Sarfaraz021 opened this issue Mar 12, 2024 · 1 comment
Labels
python Pull requests for the Python Semantic Kernel

Comments

@Sarfaraz021
Copy link

Code:

settings = kernel.get_prompt_execution_settings_from_service(
ChatCompletionClientBase, "chat-gpt")

Error:

image

@moonbox3 moonbox3 changed the title AttributeError: 'Kernel' object has no attribute 'get_prompt_execution_settings_from_service' Python: AttributeError: 'Kernel' object has no attribute 'get_prompt_execution_settings_from_service' Mar 13, 2024
@moonbox3 moonbox3 added python Pull requests for the Python Semantic Kernel and removed triage labels Mar 13, 2024
@moonbox3
Copy link
Contributor

@Sarfaraz021, as mentioned in the error message, you'll want to use kernel.get_prompt_execution_settings_from_service_id(service_id) or kernel.get_service(service_id).instantiate_prompt_execution_settings(service_id=service_id) which is what is done by calling kernel.get_prompt_execution_settings_from_service_id(service_id).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests for the Python Semantic Kernel
Projects
None yet
Development

No branches or pull requests

3 participants