Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor docs edits #1549

Merged
merged 14 commits into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
# Changelog

## [0.1.43] - TBD
## [0.1.43] - TBD
### Added
- Method `ScenarioList._from_pdf_to_image(<filename>)` generates a scenario for each page of a pdf converted into a jpeg (to use as an image instead of converting to text).
- (*In progress*) A universal remote cache is available for retrieving responses that have been previously run by any user (i.e., if you run a question that you or another user have run before, you will retrieve that response at no cost to you). It is available for all jobs run remotely by default, and new responses for any remote jobs are automatically added to it. If you want to draw fresh responses you can use `run(fresh_cache=True)` or `run(cache=Cache()`. If you want to draw responses from a different cache you can use `run(cache=<my_cache>)` (insert your own cache object). If you draw a fresh response for a question that has already been run, the new response is also added to the universal remote cache with an index (`n=2`, etc.). Universal remote cache is not available for jobs run locally. See the [remote cache](https://docs.expectedparrot.com/en/latest/remote_caching.html) section for more details.

- (*In progress*) You can now use your own keys from service providers to run jobs remotely and store them at the [Keys](https://www.expectedparrot.com/home/keys) page of your [Coop account](https://www.expectedparrot.com/login) (in lieu of your `.env` file). You can also grant access to other users (without sharing the keys directly), set limits on their usage and set RPM/TPM limits.

- (*In progress*) Parameter `run(background=True)` can be used to run a remote survey in the background so that you can continue working in your workspace. You will automatically get an email notification when the job is completed. You can check the status of the job at any time by attempting to return the results as usual, e.g., `results.columns`.

- Method `ScenarioList.from_pdf_to_image(<filename>)` generates a scenario for each page of a pdf converted into a jpeg (to use as an image instead of converting to text). Companion method `Scenario.from_pdf_to_image(<filename>)` generates a key/value for each page within the same scenario object to allow you to use multiple images at the same time. See a [notebook of examples](https://www.expectedparrot.com/content/ea777fab-9cb1-4738-8fa3-bbdef20ed60d).

### Changed

### Fixed
- A bug preventing iterations on remote inference.


## [0.1.42] - 2025-01-24
### Added
- DeepSeek models
- DeepSeek models, e.g., `Model("deepseek-reasoner")`.

- The name of the inference service is now included in the `Model` parameters and `Results` objects. This can be useful when the same model is provided by multiple services.

- The model pricing page at Coop shows daily test results for available models: https://www.expectedparrot.com/home/pricing
- The model pricing page at Coop shows daily test results for available models: https://www.expectedparrot.com/home/pricing. The same information can also be returned by calling the method `Model.check_working_models()`. Check the models for a particular service provider by passing the name of the service: `Model.check_working_models(service="google")`.

### Changed
- Default size limits on question texts have been removed.
Expand Down
14 changes: 6 additions & 8 deletions docs/api_keys.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Start by navigating to the `Keys <http://www.expectedparrot.com/home/keys>`_ pag
Your Expected Parrot API key is stored automatically at this page.


Using your Expected Parrot API key
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
**Using your Expected Parrot API key**

To use your key to run surveys at the Expected Parrot server, navigate to the `Settings <http://www.expectedparrot.com/home/settings>`_ page of your account and activate remote inference and caching:

Expand All @@ -57,8 +56,7 @@ Learn more about how :ref:`remote_inference` and :ref:`remote_caching` work.
If you *only* want to use your key to post and share content at Coop you will need to store it on your computer. See the `Coop <https://docs.expectedparrot.com/en/latest/coop.html>`_ section for details and method 2. below.


Adding keys
^^^^^^^^^^^
**Adding keys**

*This is optional.*
Use the **Add key** button to enter details of any of your own keys that you want to use to run surveys at the Expected Parrot server:
Expand Down Expand Up @@ -94,8 +92,8 @@ You can also click the **Edit** button to modify the RPM and TPM rate limits for
You can edit your sharing permissions, disable or delete your keys at any time.


Store keys in a local file
^^^^^^^^^^^^^^^^^^^^^^^^^^
2. Store keys in a local file
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This method allows you to store keys in a private file on your computer and make them available for any surveys that you run, locally or remotely.

Expand Down Expand Up @@ -128,8 +126,8 @@ It also allows you to post content to Coop, and to interact with other content t
See instructions above for de/activating remote inference and caching and `how Coop works <https://docs.expectedparrot.com/en/latest/coop.html>`_.


Setting API keys in your Python code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3. Setting API keys in your Python code
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This method is not recommended for security reasons. If you include your keys in your code, they can be seen by anyone who has access to it. This is especially risky if you are sharing your code with others or if you are using a version control system like Git.

Expand Down
16 changes: 14 additions & 2 deletions docs/coop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,18 @@ Coop

`Coop <https://www.expectedparrot.com/content/explore>`_ is a free platform for creating, storing and sharing AI-based research.
It is fully integrated with EDSL, allowing you to post, store and retrieve any objects that you've created with EDSL, together with data, notebooks and other project content.
You can also explore public content and collaborate on projects privately with other users.
You can also explore public content and collaborate on projects privately with other users:

.. image:: static/coop-my-content.png
:alt: View your content at the Coop
:align: center
:width: 100%


.. raw:: html

<br><br>


Your Coop account also provides access to features for running EDSL surveys and storing results remotely at the Expected Parrot server.
Learn more about these features in the :ref:`remote_inference` and :ref:`remote_caching` sections of the documentation.
Expand All @@ -18,12 +29,13 @@ Getting started
^^^^^^^^^^^^^^^^^^^^

`Sign up <a href="https://www.expectedparrot.com/login>`_ with an email address.

Your account comes with an **Expected Parrot API key** that allows you to:

* Post and share content at Coop
* Run surveys at the Expected Parrot server
* Use any available models with your surveys
* Use remote caching features and a universal remote cache
* Use remote caching for your responses

You can inspect your key and reset it at any time at your `Settings <https://www.expectedparrot.com/home/settings>`_ page:

Expand Down
2 changes: 1 addition & 1 deletion docs/credits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ When using your own keys, cost estimates are based on the prices listed in the `
Free credits
------------

Your Coop account comes free credits that you can use to run surveys with your Expected Parrot API key.
Your Coop account comes with free credits that you can use to run surveys with your Expected Parrot API key.

| **Are you using EDSL for a research project?**
| Send an email to *[email protected]* to request additional free credits!
Expand Down
7 changes: 3 additions & 4 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Expected Parrot delivers powerful tools for conducting research with human and a
This page provides documentation for **Expected Parrot Domain-Specific Language (EDSL)**, a Python package for performing research with AI agents and language models,
and **Coop**, a platform for creating, storing and sharing AI-based research projects.

* EDSL is available to download at `PyPI <https://pypi.org/project/edsl/>`_ and `GitHub <https://github.com/expectedparrot/edsl>`_.
* Create a `Coop account <https://www.expectedparrot.com/login>`_ easily manage API key for LLMs, run surveys on the Expected Parrot server and access special features, free storage and collaboration tools. Learn more about `how it works <https://docs.expectedparrot.com/en/latest/coop.html>`_ and start `exploring <https://www.expectedparrot.com/content/explore>`_.
* EDSL is available to download from `PyPI <https://pypi.org/project/edsl/>`_ (run `pip install edsl`). The source code is available at `GitHub <https://github.com/expectedparrot/edsl>`_.
* `Create an account <https://www.expectedparrot.com/login>`_ to post and share content, run surveys and store results at the Expected Parrot survey. Learn more about `how it works <https://docs.expectedparrot.com/en/latest/coop.html>`_ and start `exploring <https://www.expectedparrot.com/content/explore>`_.


Key features
Expand Down Expand Up @@ -84,8 +84,7 @@ Please see the links in the steps below for more details:
Your account comes with a key that allows you to run surveys with all available models at the Expected Parrot server.
You can also use and share your own keys from service providers.

Navigate to the `Keys <https://www.expectedparrot.com/home/keys>`_ page of your account to manage your keys.
See :ref:`api_keys` instructions for more details and options.
See instructions on :ref:`api_keys` for details and options.

4. **Run a survey.**

Expand Down
37 changes: 31 additions & 6 deletions docs/language_models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Language Models
Language models are used to generate responses to survey questions.
EDSL works with many models from a variety of popular inference service providers, including Anthropic, Azure, Bedrock, Deep Infra, DeepSeek, Google, Mistral, OpenAI, Perplexity and Together.
Current model pricing and performance information can be found at the Coop `model pricing page <https://www.expectedparrot.com/getting-started/coop-pricing>`_.
The same information can also be retrieved at your workspace by running the `Model.check_working_models()` method (see example code below).

We also recommend checking providers' websites for the most up-to-date information on models and service providers' terms of use.
Links to providers' websites can be found at the Coop model pricing page.
Expand Down Expand Up @@ -85,20 +86,44 @@ Output (this list will vary based on the models that have been used when the cod

* - Model Name
- Service Name
* - gemmini-pro
* - gemini-pro
- google
* - gemmini-1.0-pro
* - gemini-1.0-pro
- google
* - gemmini-1.0-flash
* - gemini-1.0-flash
- google
* - gemmini-1.0-flash-8b
* - gemini-1.0-flash-8b
- google
* - gemmini-1.5-pro
* - gemini-1.5-pro
- google
* - gemmini-2.0-flash
* - gemini-2.0-flash
- google



Check working models
--------------------

You can check current performance and pricing for models by running the following code:

.. code-block:: python

from edsl import Model

Model.check_working_models()


This will return the same information available at the `model pricing page <https://www.expectedparrot.com/getting-started/coop-pricing>`_: *Service, Model, Works with text, Works with images, Price per 1M input tokens (USD), Price per 1M output tokens (USD)*.
It can also be used to check a particular service provider (output omitted here for brevity):

.. code-block:: python

from edsl import Model

Model.check_working_models(service = "google")



.. Check models
.. ------------

Expand Down
Loading
Loading