New Changes.
This commit is contained in:
parent
af1353a41a
commit
0f3b5cb49a
3 changed files with 7 additions and 6 deletions
|
@ -1,9 +1,9 @@
|
|||
import requests
|
||||
import json
|
||||
from gradio_client import Client
|
||||
import os
|
||||
from mistralai import Mistral
|
||||
|
||||
|
||||
class API:
|
||||
@staticmethod
|
||||
def process_text_mistralai(prompt, model, system):
|
||||
|
@ -27,6 +27,7 @@ class API:
|
|||
]
|
||||
)
|
||||
return chat_response.choices[0].message.content
|
||||
|
||||
@staticmethod
|
||||
def process_text_gradio(prompt, model, system):
|
||||
client = Client(model)
|
||||
|
@ -38,7 +39,7 @@ class API:
|
|||
top_p=0.95,
|
||||
api_name="/chat"
|
||||
)
|
||||
return result;
|
||||
return result
|
||||
|
||||
# This method processes a message via ollama
|
||||
@staticmethod
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue