Soulter / hugging-chat-api

HuggingChat Python API🤗
GNU Affero General Public License v3.0
859 stars 123 forks source link

Set parameters for the chat session. #254

Closed BuckRogers1965 closed 1 month ago

BuckRogers1965 commented 3 months ago

My problem is that I cannot change the default settings for the chat model on the other side of the conversation. All the other APIs let you change settings to work the way you want.

I want an easy way to set parameters when I initialize a chat, this is how groq API works:

chat_completion = client.chat.completions.create( messages=[ { "role": "user", "content": groq_request, } ], model=groq_model, max_tokens=max_tokens, temperature=temperature, top_p=top_p, n=n, stop=stop, )

This is how open ai api works:

response = openai.ChatCompletion.create(
    model=chatgpt_model,
    messages=[
        {"role": "user", "content": chatgpt_request}
    ],
    temperature=temperature,
    max_tokens=max_tokens,
    top_p=top_p,
    frequency_penalty=frequency_penalty,
    presence_penalty=presence_penalty
)

I am wondering if you aren't doing these things because are they NOT actually available to set on the hugging chat api side. If they are not available, please tell me so and I will start bugging hugging chat about their issue.

If this is already available in your API, I request you update your readme to show this example of how to use your API correctly.

I don't think I can be clearer than the examples I have included from two other working APIs.

Thank you for your attention to this matter. I appreciate the hard work you have already put into this api, I just want to help make it better. :D

github-actions[bot] commented 3 months ago

Hi! Thanks for your issue, we will deal with your issue as soon as possible.

github-actions[bot] commented 1 month ago

This issue was marked as stale because of inactivity.

github-actions[bot] commented 1 month ago

This issue was closed because of inactivity.

BuckRogers1965 commented 3 weeks ago

and yet the issue still exists.