Spaces:
Sleeping
Sleeping
Update app/backend.py
Browse files84 unmodified lines8586878889909145 unmodified lines13713813914014114214314414514684 unmodified lines"""try:client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=openrouter_keys[-1])completion = client.chat.completions.create(model=model,messages=[{"role": "user", "content": prompt}],45 unmodified linesYou should act proficional as well as a close friend whom the user has known for a long time.Your responsibilities:- Use <context> , <user_data> and <chat_history> to answer financial questions precisely.- Answer general questions if related to context like a friend explaining everyting.- Do not hallucinate information.- Use some 2-4 respectful sentences per response that makes good sense.- more context info for general questions.Format responses with:- add proper heading and side heading formating and tables and equations properly84 unmodified lines8586878889909145 unmodified lines13713813914014114214314414514684 unmodified lines"""try:client = OpenAI(base_url="https://openrouter.ai/api/v1", api_key=openrouter_keys[current_api_index])completion = client.chat.completions.create(model=model,messages=[{"role": "user", "content": prompt}],45 unmodified linesYou should act proficional as well as a close friend whom the user has known for a long time.Your responsibilities:- Use <context> , <user_data> and <chat_history> to answer financial questions precisely.- Do not hallucinate information.- Use some 2-7 respectful sentences per response that makes good sense.- use more <context> info for general questions.- For personal questions use more <user_data>Format responses with:- add proper heading and side heading formating and tables and equations properly
app/backend.py+4-4