mem0ai / mem0

The Memory layer for your AI apps
https://mem0.ai
Apache License 2.0
22.88k stars 2.1k forks source link

Feature Request: Parameters and OpenAI model #20

Closed forgingdestiny closed 1 year ago

forgingdestiny commented 1 year ago

Parameters to specify OpenAI model and settings.

ex. I'm subclassing App and updating the model this way to test:

def get_openai_answer(self, prompt):
        messages = []
        messages.append({
            "role": "user", "content": prompt
        })
        response = openai.ChatCompletion.create(
            model="gpt-4-0613",
            messages=messages,
            temperature=0.25,
            max_tokens=1000,
            top_p=1,
        )
        return response["choices"][0]["message"]["content"]

It would be awesome to have a few parameters when querying for temperature,max_tokens, and top_p as well. Or globally/in env? not sure what's best, but happy to create a PR.

joshuasundance-swca commented 1 year ago

I agree. I think that to the greatest extent possible, all important parameters including prompts should be exposed to the user so they can change them at any time.

To further illustrate: I think that Solara would be an ideal browser-based front-end for this app. The app could start with default values, but then the user would have flexibility to change them at any time according to their needs. I would be more than happy to help with this.

josebenitezg commented 1 year ago

I opened a PR regarding this topic

cachho commented 1 year ago

This feature made it to production, #215.