[feature request] LM-Studio, Google Web Search on Selenium Library
The LM-Studio application allows to use many language models and also gives a local ip to be used by other applications, it will be more useful if it is added to the code sample python code,
# Example: reuse your existing OpenAI setup
from openai import OpenAI
# Point to the local server
client = OpenAI(base_url="http://localhost:1234/v1", api_key="lm-studio")
completion = client.chat.completions.create(
model="local-model", # this field is currently unused
messages=[
{ "role": "system", "content": "Always answer in rhymes."},
{ "role": "user", "content": "Introduce yourself."}
],
temperature=0.7,
)
print(completion.choices[0].message)
Instead of using the BING Web Search API, it will be very useful to search through google via the selenium library and go to the desired sites.
I didn't test it so I cannot confirm this.
But in PowerShell you can simply do this and it should work:
$env:OPENAI_API_BASE="http://localhost:1234/v1" python devika.py
And have LM Studio working.
For the search, I agree that Bing API is limiting. But this was already requested by myself not long ago. You should avoid double posting, and use the GitHub search feature before making new posts for issues or feature requests. https://github.com/stitionai/devika/issues/38 And as you can see there, duckduckgo and google search API are coming.
integrated custom API endpoint for openai.